Chef and Invigilator
CodeChefOpen on judge ↗
Chef is on his invigilation duty and now it's the time to collect the answer sheets of $N$ students. All the $N$ students are sitting in a single row but instead of sitting in order of their roll numbers they sat randomly. Now, Chef has to collect the answer sheets roll number wise. Chef's initial position is at the $Desk 1$. Find the $minimum$ number of moves to collect all the $N$ answer
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