← All problemsSign in

Hard eggs

There is a building with n floors and you are given k hard eggs. It is given that if an egg breaks if thrown from floor x, it will break if thrown from floor y > x. Now, the task is to find the maximum floor throwing from which the egg would not break(hereon the threshold). To perform this task, we can do this operation one or more times. One operation is defined by throwing the egg from any floor

HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17

CodeSearch Tutor

Hints, not spoilers — it won’t hand over the full solution unless you insist.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start