Let's trace [[1,2],[2,1],[3,2]].
Start from (1,1): value . Top-left (0,0) = . Match.
(2,0): first column, skip.
(2,1): value . Top-left (1,0) = . Match.
All cells match their top-left neighbor. Return true.
Now try [[1,2],[3,1]]. Cell (1,1) = , top-left (0,0) = . Match. But wait, check (1,0): first column, skip. All checked cells match, so it's Toeplitz.
You visit each cell once. time, space.