Friday, March 14, 2008

Classic 2 egg problem!

Picked up from http://classic-puzzles.blogspot.com/2006/12/google-interview-puzzle-2-egg-problem.html
Problem statement you can get on the above link. Now task is to generalize it for N story building and E eggs.

1 comment:

sudhanshu said...

Well,
Try it for N storey building and 2 eggs first.
Something like
(1+p) + (1+(p-1))+ (1+(p-2)) + .........+ (1+0) >= N
where the answer is (1+p).