Skip to content

Commit 264f6db

Browse files
author
phishman3579
committed
Found a problem in the comparator of the Interval Tree
git-svn-id: https://java-algorithms-implementation.googlecode.com/svn/trunk@436 032fbc0f-8cab-eb90-e552-f08422b9a96a
1 parent ce67e76 commit 264f6db

File tree

1 file changed

+0
-4
lines changed

1 file changed

+0
-4
lines changed

src/com/jwetherell/algorithms/data_structures/IntervalTree.java

-4
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,11 @@ public int compare(IntervalData<?> arg0, IntervalData<?> arg1) {
3333
return -1;
3434
if (arg1.start < arg0.start)
3535
return 1;
36-
/*
3736
// Then end
3837
if (arg0.end < arg1.end)
3938
return -1;
4039
if (arg1.end < arg0.end)
4140
return 1;
42-
*/
4341
// if they have the same start and end they must be equal
4442
return 0;
4543
}
@@ -57,13 +55,11 @@ public int compare(IntervalData<?> arg0, IntervalData<?> arg1) {
5755
return -1;
5856
if (arg1.end < arg0.end)
5957
return 1;
60-
/*
6158
// Then start
6259
if (arg0.start < arg1.start)
6360
return -1;
6461
if (arg1.start < arg0.start)
6562
return 1;
66-
*/
6763
// if they have the same start and end they must be equal
6864
return 0;
6965
}

0 commit comments

Comments
 (0)