摘要: 采用模拟的方案顺时针遍历所有元素 时间O(m*n)(需要遍历所有节点),空间O(1) 1 public List<Integer> spiralOrder(int[][] matrix) { 2 LinkedList<Integer> res = new LinkedList<>(); 3 if(m 阅读全文
posted @ 2021-05-27 09:52 jchen104 阅读(84) 评论(0) 推荐(0) 编辑