Insertion Sort in 2D
CodeChefOpen on judge ↗
An n×n two-dimensional array has to be sorted using an insertion sort algorithm in a unique way. The aim is when starting from element at position [0][0] and traversing all the outermost elements in an anticlockwise direction and finally returning back to [0][0], then elements should appear in a non-decreasing order. Similarly, when starting from element at position [1][1] and traversing all the e
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