← Back to companies
[ OK ] Loaded —
[ INFO ]
$ cd
$ ls -lt
01
02
03
04
05
$ ls -lt
01
02
03
04
05
user@intervues:~/$
You are given a 2D grid of characters and two coordinates start and end. The player begins at start and may move one step at a time in any of the four orthogonal directions (up, down, left, right). Each cell is one of:
'.' — an empty cell the player can stand on.'#' — an obstacle. The player cannot enter this cell.
Return true if the player can reach end from start, otherwise false.
start and end are each given as a length-2 array [row, col].
This was reported from a Roblox phone screen (February 2026). The interviewer asked for a DFS solution.A valid path is (0,0) -> (1,0) -> (2,0) -> (3,0) -> (3,1) -> (3,2) -> (3,3) -> (2,3). Walking along the top row to (0,3) and then down also works.
A wall of obstacles in row 1 separates the top row from the bottom row, so no path exists.