threeal / leetspace

A dedicated workspace and archive for my LeetCode submissions
https://leetcode.com/threeal
MIT License
1 stars 1 forks source link

Solve Problem 54. Spiral Matrix #1358

Open threeal opened 1 month ago

threeal commented 1 month ago

This issue suggests solving the problem 54. Spiral Matrix. o iterate through the matrix elements spirally, one thing to notice is that every horizontal and vertical iteration will decrease by 1 after each turn.