You are viewing a single comment's thread from:

RE: Why I Hate Job Interviews

in #life3 years ago

Imagine you snap a straight stick randomly at two different points. What is the probability that you can make a triangle with the remaining pieces?

You cannot make a triangle if one of the pieces is longer that the sum of the two other pieces.
So, if both points are in the same half of the stick, you cannot make a triangle with the three pieces.

There are two halves in the stick.

Let's suppose that your first point is in the first half. You have 50% chances of this. then, you are able to make a triangle only if your next point is in the second half, again a 50% chance. That gives you 50% x 50% = 25%.

Same probability with the first point in the second half and the second in the first half. 25% again.

So, in total, 25% + 25% = 50%.

You have a probability of 50% of being able to make a triangle with the remaining pieces.

QED

Sort:  

what if the first break is only about 10% into the first half, and the second break is right at the end of the second half? :)

Wait a minute, I think the response depends on what your definition of a triangle is. A triangle is three connected lines. Unless the interviewer slides a stick and a bottle of Elmer's glue across the table then you are just dealing with three sticks pushed together and that, my friends, is not a triangle. Do I have any of my fellow brothers in Mensa here that can give me an Ahmen?

Damn! I am wrong! And a guy with the name of a defeat pointed my mistake! (I am French)

So, what I have just established is that the probability is less than 50%.

L = length of the stick.
If the first point is in the first half, at x between 0 L and 0.5 L, to be able to have a triangle, the second point need to be between 0.5 L and (0.5 + x) L.
I have the feeling that we need to integrate a function, but I an too old and tired for that.

Unless the job is somehow related to snapping sticks or figuring out arcane algorithms, it doesn't fucking matter.

Unfortunately, as a software developer, I sometimes have to figure out arcane algorithms…

took me a long time to get it
it's not an easy question
i can't remember the reasoning, but i remember the answer
you don't need calculus for it, but I'm sure if it's strong enough it can help
you can just reasoning it out in your mind, but it's not easy
i don't want to attempt it again

haha yes it is :)
took me a long time thinking it over to get it right

You can still make a triangle...it's just one side would have a longer/running edge beyond the outer limit of the triangle. Granted, it would be a small triangle, but as long as they don't expect each piece to connect exactly at the ends, I think it still qualifies. :-)

how thick is the stick tho, gotta think about slenderness ratios.... can only contact at the outter edge of the stick so the perimeter of the triangle would be the interior edges not the centerline.

Lol! Let's not complicate things too much!

But a triangle can be made with two parts. Just will not have one wand :)

Coin Marketplace

STEEM 0.19
TRX 0.04
JST 0.026
BTC 19129.48
ETH 607.60
SBD 1.21