Concept Flow - Spiral Matrix Traversal
Initialize boundaries: top, bottom, left, right
Traverse from left to right along top row
Move top boundary down
Traverse from top to bottom along right column
Move right boundary left
Traverse from right to left along bottom row
Move bottom boundary up
Traverse from bottom to top along left column
Move left boundary right
Check if boundaries crossed
Repeat or End
We keep four boundaries and move inward in a spiral: top row left to right, right column top to bottom, bottom row right to left, left column bottom to top, then shrink boundaries and repeat until all elements are visited.
