int[][] a = new int[m][n]; for(int[] array: a) { Arrays.fill(array, 1); } Arrays.sort(array[0], startIndex, end); Arrays.sort(array[0]); // O(NlogN)
Math.min, Math.max
Last updated 3 years ago
Was this helpful?