Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit 00696fe

Browse files
committed
Update 0033. 搜索旋转排序数组.md
1 parent 9083ce3 commit 00696fe

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

‎Solutions/0033. 搜索旋转排序数组.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@
6565

6666
然后创建两个指针 $left$、$right,ドル分别指向数组首尾。让后计算出两个指针中间值 $mid$。将 $mid$ 与两个指针做比较,并考虑与 $target$ 的关系。
6767

68-
- 如果 $mid[mid] == target,ドル说明找到了 $target,ドル直接返回下标。
68+
- 如果 $nums[mid] == target,ドル说明找到了 $target,ドル直接返回下标。
6969
- 如果 $nums[mid] \ge nums[left],ドル则 $mid$ 在左半部分(因为右半部分值都比 $nums[left]$ 小)。
7070
- 如果 $nums[mid] \ge target,ドル并且 $target \ge nums[left],ドル则 $target$ 在左半部分,并且在 $mid$ 左侧,此时应将 $right$ 左移到 $mid - 1$ 位置。
7171
- 否则如果 $nums[mid] \le target,ドル则 $target$ 在左半部分,并且在 $mid$ 右侧,此时应将 $left$ 右移到 $mid + 1$ 位置。

0 commit comments

Comments
(0)

AltStyle によって変換されたページ (->オリジナル) /