mirror of
https://github.com/krahets/hello-algo.git
synced 2026-07-11 23:16:07 +00:00
Fix a figure and latex symbols.
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
接下来,循环执行以下两步。
|
||||
|
||||
1. 计算中点索引 $m = \lfloor {(i + j) / 2} \rfloor$ ,其中 $\lfloor \space \rfloor$ 表示向下取整操作。
|
||||
1. 计算中点索引 $m = \lfloor {(i + j) / 2} \rfloor$ ,其中 $\lfloor \: \rfloor$ 表示向下取整操作。
|
||||
2. 判断 `nums[m]` 和 `target` 的大小关系,分为以下三种情况。
|
||||
1. 当 `nums[m] < target` 时,说明 `target` 在区间 $[m + 1, j]$ 中,因此执行 $i = m + 1$ 。
|
||||
2. 当 `nums[m] > target` 时,说明 `target` 在区间 $[i, m - 1]$ 中,因此执行 $j = m - 1$ 。
|
||||
|
||||
Reference in New Issue
Block a user