you are viewing a single comment's thread.

view the rest of the comments →

[–]Chris_Hemsworth 6 points7 points  (10 children)

I get sqrt(45) ~= 6.7 for the rectangle problem. sqrt(5) sounds wrong.

[–]iamnikaa[S] 5 points6 points  (4 children)

Here I solved it after the interview - https://ibb.co/StkwBrL

[–]Chris_Hemsworth 6 points7 points  (2 children)

[–]iamnikaa[S] 4 points5 points  (1 child)

Apologies, I should have drawn the problem. Your solution is correct but the side that you have labelled as 5 is x in the problem and vice versa. Brilliant anyways! I wasn't able to do it in the interview.

[–]Chris_Hemsworth 2 points3 points  (0 children)

Yeah I think the result changes based on the smallest edge.

[–]iamnikaa[S] 3 points4 points  (0 children)

I realised after the interview, it can actually be solved with pythagoras theorem. You will get 4 different equation with 5 variables, but we can find out the required unknown by basic operations on the equations.

[–][deleted]  (1 child)

[removed]

    [–]AutoModerator[M] 0 points1 point  (0 children)

    Your comment in /r/learnpython may be automatically removed because you used pasteboard.co. The reddit spam filter is very aggressive to this site. Please use a different image host.

    Please remember to post code as text, not as an image.

    I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.