100 floors with 2 eggs puzzle
There is a building of 100 floors If an egg drops from the Nth floor or above it will break. If it’s dropped from any floor below, it will not break. You’re given 2 eggs. Find N, while minimizing the number of drops for the worst case.
First thought which comes to our mind is to use binary search, we first drop Egg#1 from 50th floor, if it does not break, then try the middle of second half, if breaks then we have to try each floor in first half. But this will give worst case number of drops as 50(if it brakes on 50th floor, then we have to try from 1 to 49 floors sequentially).
Second thought is to try xth floor then 2xth floor till 100th, in this case worst case time will be (100/x)+(x-1). worst case will be when Egg #1 breaks at 100th floor then we have to try Egg #2 from (100-x)th to 99th floors. In (100/x) + (x-1) equation, with increase in x, 100/x decreases while (x-1) increases, thus we can minimize it when 100/x = (x-1), this gives x ~10, which gives worst case number as 19 drops.
But increasing the floor every time by x is not a very nice idea, as with each new increase in Egg #1 drop, we should decrease Egg #2 drops to minimize worst case number. so if we drop Egg #1 from xth floor initially, then in next turn we should try x + (x-1)th floor(to keep the worst case number same).
Thus we can say X + (x-1) + (x-2)…1 = 100
X(X+1)/2 = 100 => X=14.
So we should drop Egg #1 from 14th, then 27th, then 39th and so on.
Your Answer
More puzzles to try-
Which switch will turn on the light bulb puzzle
In the picture, bulb is connected to a switch via one cable. So can you find which switch will turn ...Read More »Ratio of Boys and Girls in a Country where people want only boys
In a country, All families wants a boy. They keep having babies till a boy is born. What is the ...Read More »Sixth kid’s name
A mother gave birth to six kids. The first daughter’s name is January. The second daughter’s name is February. The ...Read More »Who is Culprit
Mr. John was killed on Saturday after noon. In Police investigation, his butler said he was bathing. His wife said ...Read More »Color of Tie
Mister Black , Brown and Green are eating at a restaurant. Each is wearing a coloured tie. The ties are ...Read More »Dirty Martini and Barman
A man walked into a pub and went straight towards the Barman. He asked for a dirty martini from the ...Read More »Come from a mine and get surrounded by wood riddle
I come from a mine and get surrounded by wood always. Everyone uses me. What am I?Read More »Should you stay, or switch, or doesn’t it matter?
The host of a game show, offers the guest a choice of three doors. Behind one is a expensive car, ...Read More »Triangle Angle
Can you find out the total number of triangles in the given figure?Read More »Who Brought What
One Saturday afternoon, four boys visited the local 5 and 10 store to buy candy. Each boy bought just his ...Read More »He can travel riddle
He can travel from there to here by disappearing, and here to there by reappearing. What is he ?Read More »How will they cross the river?
A river should be crossed by a father, a mother and their two sons and two daughters. There are some ...Read More »Time Measurement Puzzle
I possess two wires. Both of them have an inconstant thickness but both of them burn completely in sixty minutes. ...Read More »What is the sum of the first page in each book?
You have two books. One of them is upside-down and the other is rotated so the top of the book ...Read More »Ballon tragedy Riddle
One sunny afternoon, three men go for a ride on a hot air balloon over the Thar desert. After two ...Read More »Number Coding
In a certain code, MONKEY is written as 83. How is TIGER written in that code?Read More »Word Game riddle
Which three letter word can be placed between the two following words to make two new ones: DON[…]HOLERead More »I am dry when I go inside the Puzzle
I am dry when I go inside, but wet when I am pulled outside. The longer I am inside, the ...Read More »Brown egg and white egg
If a rooster laid a brown egg and a white egg, what kind of chicks would hatch?Read More »The Student and Homework
Why did the student eat his homework?Read More »