Egg Dropping Problem Binary Search Optimization
Hard

Problem Statement

Optimize the DP egg dropping solution by using binary search on the floor index to minimize attempts.

Examples

1Example 1
Input:
{ "E": 2, "F": 10 }
Output:
4
2Example 2
Input:
{ "E": 3, "F": 14 }
Output:
4
3Example 3
Input:
{ "E": 2, "F": 36 }
Output:
8
Loading...

Sign in to Run Code and Submit