摘要:
1 class Solution { 2 public int[] findDiagonalOrder(int[][] matrix) { 3 if(matrix.length == 0) return new int[0]; 4 int row = matrix.length; 5 int col = matrix[0].len... 阅读全文
摘要:
1 class Solution { 2 public int minSubArrayLen(int s, int[] nums) { 3 if(nums.length == 0) return 0; 4 int count = 0; 5 int i = 0, j = 0; 6 int min = Integer... 阅读全文
摘要:
1 class NumArray { 2 int[] preSum; 3 int[] arr; 4 public NumArray(int[] nums) { 5 arr = nums; 6 preSum = new int[nums.length+1]; 7 preSum[0] = 0; 8 ... 阅读全文