Given an n x n binary matrix 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 in a binary matrix is a path from the top-left cell to the bottom-right cell such that:
The length of a clear path is the number of visited cells.
Return -1 if no such path exists.
Input: grid = [[0,1],[1,0]]
Output: 2
Explanation: The shortest clear path is (0,0) → (1,1), which has length 2.
Input: grid = [[0,0,0],[1,1,0],[1,1,0]]
Output: 4
Explanation: The shortest clear path is (0,0) → (0,1) → (0,2) → (1,2) → (2,2), but a shorter one exists: (0,0) → (0,1) → (1,2) → (2,2) with length 4.
Input: grid = [[1,0,0],[1,1,0],[1,1,0]]
Output: -1
Explanation: The top-left cell is 1, so no clear path exists.