Created
April 27, 2017 21:40
-
-
Save Onaiplee/1eed47cf987e027c70a03ba2c97c31bf to your computer and use it in GitHub Desktop.
oracle phone
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class IntervalComparator implements Comparator<Interval> { | |
@Override | |
public int compare(Interval i1, Interval i2) { | |
return i1.start == i2.start ? Long.compare(i1.end, i2.end) : Long.compare(i1.start, i2.start); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment