56. Merge Intervals
1 | public int[][] merge(int[][] a) { |
1 | public int[][] merge(int[][] a) { |
直接模拟
1 | class Solution { |
整理后
1 | public List<Integer> spiralOrder(int[][] matrix) { |
直接使用一个循环
1 | public List<Integer> spiralOrder(int[][] matrix) { |
新建一个等大小的数组,然后换一种形式为原先的数组赋值
1 | public void rotate(int[][] matrix) { |
Update your browser to view this website correctly. Update my browser now