Learn
Practice
Newsletter
Resources
Animations
New
F
Toggle theme
0
F
0
Toggle menu
← Back to All Animations
Spiral Matrix
Bookmark
Input
3×3 Matrix
3×4 Matrix
2×2 Matrix
4×5 Matrix
Single Row
Single Column
Custom
matrix
=
[[1,2,3],[4,5,6],[7,8,9]]
MATRIX
1
2
3
4
5
6
7
8
9
RESULT
algo
master
.
io
Step:
Start: Traverse matrix in spiral order
0 / 19
Input
3×3 Matrix
3×4 Matrix
2×2 Matrix
4×5 Matrix
Single Row
Single Column
Custom
matrix
=
[[1,2,3],[4,5,6],[7,8,9]]
0 / 19
MATRIX
1
2
3
4
5
6
7
8
9
RESULT
algo
master
.
io
Step:
Start: Traverse matrix in spiral order