mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-19 07:17:54 +08:00
Fix the test case of binary search.
This commit is contained in:
@@ -47,7 +47,7 @@ fn binary_search_lcro(nums: &[i32], target: i32) -> i32 {
|
||||
/* Driver Code */
|
||||
pub fn main() {
|
||||
let target = 6;
|
||||
let nums = [ 1, 3, 6, 8, 12, 15, 23, 67, 70, 92 ];
|
||||
let nums = [ 1, 3, 6, 8, 12, 15, 23, 26, 31, 35 ];
|
||||
|
||||
// 二分查找(双闭区间)
|
||||
let mut index = binary_search(&nums, target);
|
||||
|
||||
Reference in New Issue
Block a user