Those examples listed are good solutions, but if you wanted to make a bold attempt at wowing them, then here's one answer. This one allows you to save both bulbs and conserve them, which is why I think this answer has a potential wow'ing factor! It's also the answer I would give as a supplemental...it's pretty outlandish for it to stand as your only answer. Using the two bulbs you'll know the make and model. Retrieve the information from the manufacturer that gives data on the physical characteristics, i.e. stress, that the light bulb's glass can take. Then make a calculation that tells you at which height will that stress be reached if you were to drop a bulb from that height. You can also figure out the influence from the material the floor is made of. After that, you go home into your apartment and put those light bulbs back where you found them haha

The issue with a research-based answer is that parameters of the posed problem is not based in reality, i.e. dropping a light bulb from any floor would almost guarantee it breaking in real life. So the interviewer is really looking for problem solving skills for an hypothetical situation rather your attention to detail in a real world situation.

use they way u use binary search. STEP 1:divide number of floors(n) by 2 = n/2 , drop it there STEP 2: if it breaks, repeat step 1 taking n= n/4 STEP 3: if it doesn not break, drop it next at n=3n/4 refer BINARY SEARCH

@Keshav: What if first bulb breaks at n/2, then according to binary search the next bulb will be dropped at n/4 as u mentioned. What if the second bulb breaks at this point. You dont have any bulbs left to find to out if the threshold is lesser than that????

You start with the n/2 floor. After that you go one by one from either 1 or n/2 +1 until it breaks. If it does not break at n/2 you can go to 3n/4 and try. depending on floor this will either save or possibly add one additional drop. This always gives you Floor + 2 drops (or Floor - n/2 + 2 drops if it is a high floor)

1. Start with the 13th floor. If it breaks, start checking sequentially from floor no. 1 (1, then 2, then 3, and so on) 2. If it doesn't, go to the 13+12th floor = 25th floor. Then to the 25+11th floor = 36. Then 46, 55, and so on. If the egg breaks at, let's say the 55th floor, starting checking for the 46th, 47th, 48th (...) floor till the 54th one. The advantage of using this procedure is you're able to find out the exact floor in a maximum of 13 steps.

I guess the bulb would break from 1st floor itself :p

Assuming no of floors = A, tester can escape x floor at a time e.g. if x = 10, test at 10, 20,30... If 1bulb breaks at 20, test from 11 to 19. So solution is minimum of (A/x + x-1) using derivatives x=√A is for minimum i.e. min value is A/√A +√A -1 =2√A-1. Example for 100 floors minimum is 19

it depends the speed and the force it is doped

Start from floor 1, drop the bulb. If it breaks, then it tells you that at any floor the bulb will break. But, if it doesn't use the same bulb to test its survival on n+1 floor. By continuing this you will reach a floor where the bulb breaks. Hence, you identified the floors where the bulb breaks (BFloor) and the floor where it doesn't (BFloor-1), also you have saved a bulb for use.