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 4524ae8

Browse files
docs: fix solution to lcof problem: No.11 (#3730)
1 parent 2ea718e commit 4524ae8

File tree

1 file changed

+1
-1
lines changed
  • lcof/面试题11. 旋转数组的最小数字

1 file changed

+1
-1
lines changed

‎lcof/面试题11. 旋转数组的最小数字/README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ edit_url: https://github.com/doocs/leetcode/edit/main/lcof/%E9%9D%A2%E8%AF%95%E9
4646

4747
- `numbers[mid] > numbers[r]`:中间元素一定不是最小值,因此 $l = mid + 1$;
4848
- `numbers[mid] < numbers[r]`:中间元素可能是最小值,因此 $r = mid$;
49-
- `numbers[mid] == numbers[r]`:中间元素一定不是最小值,因此 $r = r - 1$。
49+
- `numbers[mid] == numbers[r]`:无法确定最小值的位置,但可以简单地缩小搜索范围,因此 $r = r - 1$。
5050

5151
循环结束时,指针 $l$ 和 $r$ 指向同一个元素,即为最小值。
5252

0 commit comments

Comments
(0)

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