why we take maximum of the two cases
egg is breaked
egg is not breaked
i am asking the recursive solution of this problem
why we take maximum of the two cases
egg is breaked
egg is not breaked
i am asking the recursive solution of this problem
Hi Shubham,
in this problem we have to take the maximum of the two cases :
because we are supposed to minimize the no. of trials for the worst case.
We will the max of above two cases for every floor (because we have to minimize the no. of trials for the worst case not the best case) and in all these recursion calls we will choose the floor which yields minimum number of trials.
Hope this helps you in getting why the max of two cases is taken
why are we taking max??plz elaborate…