← All problemsSign in

Modified Jenga

You have $n$ Jenga blocks, with values written on them from $1$ to $n$. There will be exactly $1$ block, with value = $i$ ($i$ belongs to range [1,n]). You organised the Jenga Blocks in the form of a stack, in increasing order of their values, with the top-most block having value equal to $1$ and the bottom-most block having value equal to $n$. Your one friend is gonna play with you. In ever

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