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: top <= bottom and left <= right
Repeat traversal
We keep four boundaries and move around the matrix edges in a spiral, shrinking boundaries after each side is traversed, until all elements are visited.
