Update 0056.合并区间.md
Update Java solution. For sorting, no need to compare the second element in an interval.
This commit is contained in:
parent
7b3f8ea4dd
commit
67313906d1
|
|
@ -144,11 +144,7 @@ class Solution {
|
|||
Arrays.sort(intervals, new Comparator<int[]>() {
|
||||
@Override
|
||||
public int compare(int[] o1, int[] o2) {
|
||||
if (o1[0] != o2[0]) {
|
||||
return Integer.compare(o1[0], o2[0]);
|
||||
} else {
|
||||
return Integer.compare(o1[1],o2[1]);
|
||||
}
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue