← All problemsSign in

Lost Yash

Yash was lost in an Grid with only one exit and He called Aryan to ask for help. Aryan gave him a string of $N$ moves to get out: - '$U$' means going $\text{up}$. ($y$ $\rightarrow$ $y+1$) - '$D$' means going $\text{down}$. ($y$ $\rightarrow$ $y-1$) - '$R$' means going $\text{right}$. ($x$ $\rightarrow$ $x+1$) - '$L$' means going $\text{left}$. ($x$ $\rightarrow$ $x-1$) Now, Yash wants to know t

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