← All problemsSign in

Abhi and The Monster

Once Abhi got a call from his friend Priya. Priya needs some help in solving a Matrix problem as she is trapped by a monster. Abhi has X level of intelligence. There is a matrix M of size P*P, which have all values from 1 to P^2. Abhi has to traverse through all the values of the matrix exactly once. He will start his journey from 1, then to P^2, then to 2, then to P^2-1,then to 3 and so on till 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.

voice by Sarvam AI

Sign in to chat with the tutor and save your progress.

Sign in to start