Skip to content

Commit a6fa7c6

Browse files
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
1 parent 017acc8 commit a6fa7c6

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

data_structures/Binary search algo/search_insert_position.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import List
22

3+
34
def search_insert(nums: List[int], target: int) -> int:
45
"""
56
Finds the index to insert a target value into a sorted list.
@@ -24,4 +25,4 @@ def search_insert(nums: List[int], target: int) -> int:
2425
left = mid + 1
2526
else:
2627
right = mid - 1
27-
return left
28+
return left

data_structures/Binary search algo/search_range.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
from typing import List
22

3+
34
def search_range(nums: List[int], target: int) -> List[int]:
45
"""
56
Finds the first and last position of a given target value in a sorted array.
@@ -36,4 +37,4 @@ def find_bound(is_first: bool) -> int:
3637
return [-1, -1]
3738

3839
last_bound = find_bound(False)
39-
return [first_bound, last_bound]
40+
return [first_bound, last_bound]

0 commit comments

Comments
 (0)