This project implements a matrix traversal algorithm that creates a spiral pattern starting from the end of the matrix boundaries.
-
Start Point: Bottom-Right Corner (
$N-1, N-1$ ) -
Direction Flow:
-
$\uparrow$ Up (Rightmost available column) -
$\leftarrow$ Left (Topmost available row) -
$\downarrow$ Down (Leftmost available column) -
$\rightarrow$ Right (Bottommost available row)
-
Matches the 4th pattern in the problem set:
| 5 | 4 | 3 |
|---|---|---|
| 6 | 9 | 2 |
| 7 | 8 | 1 |
- 1 -> 3: Goes Up
- 3 -> 5: Goes Left
- 5 -> 7: Goes Down
- 7 -> 8: Goes Right...
This repository demonstrates boundary-based matrix filling in C.