Alice Potter and Wingardium Leviosa
Alice wants to clean up the mess in her room. She has $N$ objects in her room, numbered from $1$ to $N$. Each object must be in its place. In other words, $i^{th}$ object should be in the $i^{th}$ location. Currently, the object with the index $P_i$ is in the $i^{th}$ location. To move the objects, Alice can use the spell `Wingardium Leviosa`. To perform it: - She needs to specify $N$ **diff
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