Two eggs puzzle is a famous puzzle asked by Google. Here’s the puzzle

**Puzzle :**You are given 2 eggs.And there’s 100 floor building. Eggs can be very hard or very fragile means it may break if dropped from the first floor or may not even break if dropped from 100th floor.Both eggs are identical.You have to find the highest floor from which the egg can be dropped without breaking.**What is the minimum number drops you need to make. You are allowed to break 2 eggs in the process.**

While I admit that the problem is bit tricky given all these constraints . But try hard before viewing the solution.

For more interesting puzzles see our puzzles page

“minimum drops required would be [(100/10)+10-1]=19” is wrong solution.

The correct answer is 14 drops:

n + (n-1) + (n-2) + (n-3) + (n-4) + … + 1 >= 100

n (n+1) / 2 >= 100

This is a quadratic equation, with the positive root of 13.651 (Which we have to round up to 14)

Our first drop should be from floor 14, if egg survives we step up 13 floors to floor 27, then up 12 floors to 39 …

The optimal strategy is to work our way until the first egg breaks, then back up to one floor higher than the line above and then proceed floor-by-floor until we find the exact solution.

The maximum of 14 drops is a combination first egg drops (made in steps), and second egg drops (made in ones). For every drop we take hopping up the tower, we reduce the worst-case number of single drops we’d have to take so that no solution is an outlier.