59. Spiral Matrix II
Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
Example:
Last updated
Was this helpful?
Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order.
Example:
Last updated
Was this helpful?