Skip to content

Commit 02f40c6

Browse files
authored
Merge pull request #40 from ProgVal/begin-end-complexity
Complexity of IntervalTree.{begin,end} is O(1), not O(n).
2 parents 1115db4 + e3f747d commit 02f40c6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

intervaltree/intervaltree.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -818,7 +818,7 @@ def begin(self):
818818
"""
819819
Returns the lower bound of the first interval in the tree.
820820
821-
Completes in O(n) time.
821+
Completes in O(1) time.
822822
"""
823823
if not self.boundary_table:
824824
return 0
@@ -828,7 +828,7 @@ def end(self):
828828
"""
829829
Returns the upper bound of the last interval in the tree.
830830
831-
Completes in O(n) time.
831+
Completes in O(1) time.
832832
"""
833833
if not self.boundary_table:
834834
return 0

0 commit comments

Comments
 (0)