Sunday, May 8, 2016

2 Eggs Interview Problem

We have an egg problem again. There is a 36 story building for which you have complete access. You have two eggs and you must follow the below facts:

An egg that does not breaks on falling can be re used.

1) A broken egg will be discarded immediately

2) All the eggs will experience the same effect of the fall as all the eggs are identical.

3) Suppose if an egg breaks on falling from first floor, it will definitely break from all the floors above the first floor.

4) If an egg does not breaks from falling from the thirty sixth floor, it will not break from all the floor below it as well.

5) All you have to do is find out the minimum drops with which you can determine the floor which is safe to drop eggs from.

View Answer

No comments:

Post a Comment