If you have 2 eggs, and you want to figure out what's the highest floor from which you can drop the egg without breaking it, how would you do it? What's the optimal solution?
Answers
Answered by
0
ooooh how can we know the highest floor by dropping the eggs
YashasNagabhushan:
it is the tricky question
Now assume the first egg did not break, we know the 3rd floor is safe. You still have one more egg to spare, try it on the 4th floor. The conclusion will be either you can drop an egg on the 3rd floor or 4th floor
Now if the 1st floor counts, minus the floor number by 1 on all the floor numbers above.
Similar questions