Zig-Zag
CodeChefOpen on judge ↗
Here is a problem of zig-zag matrix. You have to print given numbers into sorted order in zig-zag pattern. Input - The first line of the input contains an integer N denoting N*N matrix. - Next line contain an integer S denoting values for 0:Ascending order , 1:Descending order. Output - Print matrix in zig-zag pattern which is given below, starting with top left-most element. Constraints -
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