← All problemsSign in

Save the Mother

- John's mother is ill and he has to go at a secret place for her medicine but on the way there is problem. - There will be a matrix containing 0 and 1 of dimention (N * M). - He can move up,down,left,right but not diagonally. - He can move from one index to Neighbor index if the value of that index is 0 - Initially he is at index (0,0) and its value is 0. - He has to reach at index (N-1,M-1) - Fi

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