Search
⌘K

Leetcode 59. Spiral Matrix II

Generate an n×n matrix containing the integers 1..n^2 arranged in clockwise spiral order, starting at the top-left and proceeding along the top row, right column, bottom row, and left column repeatedly until the matrix is filled.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.