Search
⌘K

Leetcode 2120. Execution of All Suffix Instructions Staying in a Grid

Given an n×n grid and a start cell, for each suffix of a movement string (L/R/U/D) determine how many instructions the robot can execute before a move would take it off the grid. Return an array where entry i is the number of steps executable starting from instruction i.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.