We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e109908 commit c9679e3Copy full SHA for c9679e3
searches/binary_search.py
@@ -45,7 +45,7 @@ def bisect_left(
45
2
46
"""
47
if hi < 0:
48
- hi = len(sorted_collection)-hi
+ hi = len(sorted_collection)-hi #in case of usage of negative indexing for hi
49
50
while lo < hi:
51
mid = lo + (hi - lo) // 2
@@ -86,7 +86,7 @@ def bisect_right(
86
87
88
89
90
91
92
0 commit comments