Solution: Shortest Path in Binary Matrix
C# solution for the Shortest Path in Binary Matrix problem using the Graphs pattern.
We'll cover the following...
We'll cover the following...
Statement
Given a square binary matrix grid of size n x n, find the length of the shortest clear path from the top left cell to the bottom right cell.
A clear path is a sequence of cells such that every visited cell has value grid[0][0] and ends at grid[n-1][n-1]. Return the number of cells in the shortest such path. If no clear path exists, return