59_Spiral Matrix II
Given a positive integer n
, generate a square matrix filled with elements from 1
to n^2
in spiral order.
Example:
Solution:
The idea is the same as leetcode 54. Spiral Matrix
Last updated
Given a positive integer n
, generate a square matrix filled with elements from 1
to n^2
in spiral order.
Example:
The idea is the same as leetcode 54. Spiral Matrix
Last updated