Amanjot Singh
BAN USERMain Process
-------------|--------------
Forked 1 Forked 2
|
Forked 3
All in all 4 processes including the Main Process.
What happens is that each forked process starts execution right after it got forked. So , the first forked process will itself be forked.
Thus , Main process has 2 child processes , and First child also has a child process.
What about the numbering be 6,0,12,13,14,15 . In this case every number from 1-12 has a probability of 1/36 and thus evenly distributed between 1-12.
Dice 1 Dice 2
6 6
5 0
4 12
3 13
2 14
1 15
The answer would be 14.
- Amanjot Singh October 25, 2012Take the first egg and then identify the drop locations as 14 , 27 (14+13) , 39 (27+12) , 50 (39+11) , 59 (50+9) ...and so on till you reach 100.
Now start dropping the first egg on these drop locations in an ascending order.
Whenever it breaks , take the second egg and start dropping it from the previous location to that location successively.
Eg. Suppose the first egg breaks at 50th floor.
So no. of drops of first egg till the 50th floor = 4 (14,27,39,50)
Now start from 39 (previous drop location) and start dropping the second egg on successive floors . For this the max no. of drops would come out to be 10.
So 4+10 =14 (Max no. of drops)
The answer is the same when you calculate for any location.