algorithms/src/dp/EggDroppingPuzzle.java
// number of trials in worst case. 
number of trials in worst case.
number of trials in worst case .
static int minTrialsbiKo(int n, int k) 
	{ 
	    int low = 1, high = k; 
	    while (low < high) { 
	        int mid = (low + high) / 2; 
	        if (binomialCoeff(mid, n, k) < k) 
	            low = mid + 1; 
	        else
	            high = mid; 
	    } 
	    return low; 
	}
static int minTrialsbiKo ( int n , int k ) { int low = 1 , high = k ; while ( low < high ) { int mid = ( low + high ) / 2 ; if ( binomialCoeff ( mid , n , k ) < k ) low = mid + 1 ; else high = mid ; } return low ; }
number of trials in worst case.
number of trials in worst case .
// Initialize low and high as 1st   //and last floors  // Do binary search, for every mid,   // find sum of binomial coefficients and   // check if the sum is greater than k or not. 