Egg Problem
CodeChefOpen on judge ↗
You are given 2 eggs and an integer N denoting number of floors in a building. There is Xth floor in same building from which if egg is dropped, it will break but it will not break if dropped from X-1,X-2,X-3,...2,1 . Note: If egg dropped from Xth floor breaks, it will surely break if dropped from X+1,X+2,...,N. You have to tell minimum number of iterations/test in which value of X can be found.
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.
Sign in to chat with the tutor and save your progress.
Sign in to start