Spiral Matrix II

问题介绍 问题描述:Given a positive integer n, generate a square matrix filled with elements from 1 to n2 in spiral order. 示例: Input: 3 Output: [ [ 1, 2, 3 ], [ 8, 9, 4 ], [ 7, 6, 5 ] ] 约束条件:NULL 解决思路 思路:除了螺旋型
相关文章
相关标签/搜索