Fix the test case of binary search.

This commit is contained in:
krahets
2023-05-21 19:29:24 +08:00
parent d3cc149c5a
commit d95c628eef
13 changed files with 36 additions and 12 deletions

View File

@@ -41,7 +41,7 @@ def binary_search_lcro(nums: list[int], target: int) -> int:
"""Driver Code"""
if __name__ == "__main__":
target: int = 6
nums: list[int] = [1, 3, 6, 8, 12, 15, 23, 67, 70, 92]
nums: list[int] = [1, 3, 6, 8, 12, 15, 23, 26, 31, 35]
# 二分查找(双闭区间)
index: int = binary_search(nums, target)