← All problemsSign in

Utkarsh and Nascar

Utkarsh likes to driver his Nascar around the town of Breeze. The town can be described as an $N$ X $M$ grid where the top-left cell is $(0,0)$ and the bottom-right cell is $(n-1,m-1)$ . He can only drive in 4 directions : **up, down, left, right** and cannot go outside the city boundaries. There is a cost associated while driving from one cell to another, - If he drives right or left into a colum

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