mirror of
https://github.com/krahets/hello-algo.git
synced 2025-07-24 02:03:10 +08:00
Fix the test case of binary search.
This commit is contained in:
@ -52,7 +52,7 @@ function binarySearchLCRO(nums: number[], target: number): number {
|
||||
|
||||
/* Driver Code */
|
||||
const target = 6;
|
||||
const nums = [1, 3, 6, 8, 12, 15, 23, 67, 70, 92];
|
||||
const nums = [1, 3, 6, 8, 12, 15, 23, 26, 31, 35];
|
||||
|
||||
/* 二分查找(双闭区间) */
|
||||
let index = binarySearch(nums, target);
|
||||
|
Reference in New Issue
Block a user