Skip to content

Commit cd3f6ea

Browse files
committed
change typo hight to high
1 parent f40d000 commit cd3f6ea

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

search/search_insert.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,13 @@ def get_index(array: list, element: Any) -> int:
3333

3434
def get_insert_place(array: list, target: int) -> int:
3535
low = 0
36-
hight = len(array) - 1
37-
while low <= hight:
38-
middle = (low + hight) // 2
36+
high = len(array) - 1
37+
while low <= high:
38+
middle = (low + high) // 2
3939
if array[middle] < target:
4040
low = middle + 1
4141
else:
42-
hight = middle - 1
42+
high = middle - 1
4343
return low
4444

4545

0 commit comments

Comments
 (0)