Sorting Names
CodeChefOpen on judge ↗
Sveta has received all the N editions (numbered from 1 to N) of "How to Code for Noobs" from Valya for Christmas. However the order of the books is all mixed up. Specifically, the $i^{ith}$ book is of edition $A_i$. Sveta wants to sort all these books from the first edition to the $N^{th}$, i.e, in the ascending order according to the editions. To do so, she can only make use of the "SWAP" operat
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