Back to problems

Maze Path Finding

Algorithm · Meta · Medium

Problem You are given a 2D maze encoded as a matrix of integers: 0 represents an empty cell (a spot the ball can occupy). 1 represents a wall (an obstacle the ball cannot pass through). You are also given a start coordinate start = (sr, sc) and a destination coordinate destination = (dr, dc), both guaranteed to land on empty cells. The ball moves under a rolling mechanic. From its current cell you choose one of the four cardinal directions (up, down, left, or right). Once…

Checking your access…