Back to Questions

Shortest Path in Binary Matrix

71K viewsAsked at Amazon
Medium

Question Explain

Given an $n \times n$ binary matrix `grid`, return the length of the shortest clear path from the top-left to the bottom-right corner. A clear path uses only cells with 0. Use BFS.

Start Trying This Question Simulation

Practice answering orally or with text to get instant AI feedback.

Practice with This Question
Shortest Path in Binary Matrix - Interview Question