Shortest Path in Binary Matrix
Medium
Graphs
In an n x n grid of 0s and 1s, find the length of the shortest clear path from the top-left to the bottom-right cell. A clear path only uses 0 cells and may move in all 8 directions. The length is the number of cells visited. Print -1 if no path exists.
Constraints
1 <= n <= 100
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.