leetcode253. 會議室II(java):最小堆

題目 思路 用優先隊列實現最小堆 1.先將數組進行升序排序java Arrays.sort(intervals,(o1,o2)->o1[0]-o2[0]); 這裏使用了Lambda表達式,完整寫法應該是web Arrays.sort(intervals,new Comparator<int[]>(){ @Override public int compare(int[]o1,int[]o2){
相關文章
相關標籤/搜索