You are given n floors numbered from n.
There exists some floor f where f n such that any egg dropped from a floor higher than f will break, and any egg dropped from floor f or below will not break.
In each move, you can take an unbroken egg and drop it from any chosen floor x where x n. If the egg breaks, you can no longer use it. If the egg does not break, you can reuse it in subsequent moves.
Return the minimum number of moves required to determine the value of f with certainty in the worst case.
Constraints:
n
You are given n floors numbered from n.
There exists some floor f where f n such that any egg dropped from a floor higher than f will break, and any egg dropped from floor f or below will not break.
In each move, you can take an unbroken egg and drop it from any chosen floor x where x n. If the egg breaks, you can no longer use it. If the egg does not break, you can reuse it in subsequent moves.
Return the minimum number of moves required to determine the value of f with certainty in the worst case.
Constraints:
n