← All problemsSign in

GRID MOVES

You are playing a game in which you are in 2D grid of $N X N$ size. In each cell there is a laddu. Initially you are at $(x,y)$ in 0-indexed format on the plane. Given a sequence of moves, find the number of laddus you have eaten after completing all the moves. You are given a string S that represents the sequence of moves you have to take where S[i] denotes the ith move. The moves string has th

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