MCPcopy Create free account
hub / github.com/codemistic/Data-Structures-and-Algorithms / compare

Method compare

LeetCode Solutions/merge interval.java:37–43  ·  view source on GitHub ↗
(Interval a, Interval b)

Source from the content-addressed store, hash-verified

35 Collections.sort(res, new Comparator < Interval > () {
36
37 public int compare(Interval a, Interval b) {
38 if (a.start == b.start) {
39 return a.finish - b.finish;
40 }
41
42 return a.start - b.start;
43 }
44
45 });
46

Callers 1

mergeMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected