criskgl
11/28/2019 - 3:27 PM

Sort Array of Arrays by one of the values

java.util.Arrays.sort(intervals, new java.util.Comparator<int[]>() {
    public int compare(int[] a, int[] b) {
        return Integer.compare(a[0], b[0]);
    }
});