Problem: Shortest Path in Binary Matrix (LeetCode ). You have an grid where each cell is (clear) or (blocked). Find the shortest path from the top-left corner to the bottom-right corner. You can move in directions: up, down, left, right, and diagonals.
Return the length of the shortest clear path, or if no path exists. This is a grid BFS problem. Each cell is a node. Adjacent cells are neighbors. Run BFS starting from and stop when you reach .