|
Question:
Given 2 egss and a building with 100 floors. Egg dropped from floor-number k or above(i.e k, k+1, ... 100) will be broken. Otherwise(i.e. when dropped from floors 1,2,... k-1), egg is not broken.
If you are given only one egg and asked to find out "k", u will have to obviously start from floor 1, floor 2, .... and go(reusing the egg) till the egg breaks.
(1) If u r given 2 eggs, what is the minimum worst case "number of drops" to find k ? What is ur strategy ?
(2) If u r given 3 eggs, what is the minimum worst case "number of drops" to find k ? What is ur strategy ?
(3) In general, for n floors(not 100 floors) and m eggs, what is the minimum worst case "number of drops" to find k ? What is ur strategy ?
|