← All problemsSign in

CAKE-RUN

Chef had a Sorted Array A such that A={ All possible strings of length N}. However, while chef was baking a cake someone swapped its elements randomly multiple times. Since, the no. of elements of A can be large chef cannot sort them all in order. However, Chef knows that it is easy to find out the index of given string S in A when it was initially sorted. Given a string S of length N find it's i

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