mirror of
https://github.com/krahets/hello-algo.git
synced 2026-08-09 10:30:59 +00:00
build
This commit is contained in:
@@ -569,7 +569,7 @@ comments: true
|
||||
if nums[m as usize] < target { // 此情况说明 target 在区间 [m+1, j) 中
|
||||
i = m + 1;
|
||||
} else if nums[m as usize] > target { // 此情况说明 target 在区间 [i, m) 中
|
||||
j = m - 1;
|
||||
j = m;
|
||||
} else { // 找到目标元素,返回其索引
|
||||
return m;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user