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 解決思路 思路:除了螺旋型
相關文章
相關標籤/搜索