Both eggs are identical.
2 eggs highest floor.
If an egg is dropped and does not break it is undamaged and can be dropped again.
For example if it breaks on floor 57 we know that the highest floor that an egg can withstand a drop from is floor 56.
Given 2 eggs and k floors find the minimum number of trials needed in worst case.
You need to find the minimum floor where the egg breaks.
You need to figure out the highest floor of a 100 storey building an egg can be dropped without breaking.
The aim is to find out the highest floor from which an egg will not break when dropped from a floor.
If it survives great we go up to floor 2 and try again then floor 3 all the way up the building.
One floor at a time.
Now consider if the first egg breaks on the 8th drop at floor 84.
We must now narrow it from floor 78 83 which could take from 1 to 6 drops.
Two cases arise 1 if egg breaks we have one egg left so we need three more trials.
A building has 100 floors.
We then have to narrow it from floor 15 26 with the second egg which could take from 1 to 12 drops.
2 eggs 100 floors.
You are given 2 eggs.
K 10 output.
You are given two eggs and access to a 100 storey building.
There s no other one egg solution.
This problem is a specific case of n eggs and k floors.
And you need to find it in a way suc.
You are given 2 eggs and you are in a building with 100 floors.
4 we first try from 4 th floor.
Let s talk about the 2 egg problem courtesy of interview cake.
You have access to a 100 storey building.
However once an egg is broken it cannot be used anymore.
In total a maximum of 14.
So let s say the first egg breaks on 27 after 2 drops.
Eventually the egg will break and we ll have a solution.