← All problemsSign in

Petrol is luxury

Petrol's Price in Chef Land is hiking to its all time peek. hence Chef needs your help to find the shortest path between $(0,0)$ where chef lives to $(p,q)$ where chef wants to go. $N$ $x$ $M$ matrix is given to you to find the shortest path. matrix contains values 0's and 1's .The path can only be created out of a cell if its value is 1. ###Input: - First line will contain $T$ no. of test cases

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