1
int[][] nums = new int[][]{{1,2,3},{4,5,6}};
Arrays.sort(nums, (a,b)->(a[0]-b[0]));
Queue<Integer> maxHeap = new PriorityQueue<>((a1, a2) -> (a2 - a1));
2
Map<int[], Integer> map = new TreeMap<>(new Comparator<int[]>() {
@Override
public int compare(int[] o1, int[] o2) {
if (o1[1] < o2[1]) {
return -1;
}
return 1;
}
});