摘要:
class Solution { public int eraseOverlapIntervals(int[][] intervals) { Arrays.sort(intervals,(a,b)->a[1]-b[1]); int n=intervals.length; int right=inte 阅读全文
posted @ 2022-02-21 21:05
livingsu
阅读(26)
评论(0)
推荐(0)
摘要:
将数组排序:按照h降序,h相同的按照k升序。然后,遍历,并按照k,进行下标插入。 class Solution { public int[][] reconstructQueue(int[][] people) { Arrays.sort(people,(a,b)->{ if(a[0]!=b[0]) 阅读全文
posted @ 2022-02-21 20:02
livingsu
阅读(20)
评论(0)
推荐(0)

浙公网安备 33010602011771号