Given an n x n binary grid, return the length of the shortest clear path from the top-left cell (0, 0) to the bottom-right cell (n - 1, n - 1). A clear path is a path of cells with value 0 such that adjacent cells share an edge or corner (8-directional connectivity). If there is no clear path, return -1.
Visualizer will appear here