Concept Flow - Spiral Matrix Traversal
Start with boundaries: top, bottom, left, right
Traverse from left to right on top row
Move top boundary down
Traverse from top to bottom on right column
Move right boundary left
Traverse from right to left on bottom row
Move bottom boundary up
Traverse from bottom to top on 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→right, right column top→bottom, bottom row right→left, left column bottom→top, then repeat until all elements are visited.
