Super Egg Drop
You are given k identical eggs and you have access to a building with n floors. Your goal is to determine the minimum number of moves needed to find the critical floor f where eggs start breaking.

30:00

Super Egg Drop
hard
Topics
Companies

You are given k identical eggs and you have access to a building with n floors. Your goal is to determine the minimum number of moves needed to find the critical floor f where eggs start breaking.

Example 1:
Input: {"k":2,"n":6}
Output: 3
Constraints:
  • 1k1001 \leq k \leq 100

  • 1n1041 \leq n \leq 10^4

Input
arr ={"k":2,"n":6}

2 eggs, 6 floors. Ask instead how many floors a given number of moves can settle.

State
eggs
2
floors
6
moves
0
m
0
j
-1
Variables
eggs=2
floors=6
Variables
VariableValue
eggs2
floors6
DepthFunction Call
Stack empty
0/10