Skip to content

Commit 5791b1a

Browse files
committed
commit changes to gh-pages
1 parent 5f7a6b2 commit 5791b1a

File tree

2 files changed

+17
-1
lines changed
  • _includes/_root/find-minimum-in-rotated-sorted-array-ii
  • find-minimum-in-rotated-sorted-array-ii

2 files changed

+17
-1
lines changed
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Merge [Find Minimum in Rotated Sorted Array](../find-minimum-in-rotated-sorted-array) and [Search in Rotated Sorted Array II](../search-in-rotated-sorted-array-ii)
2+
3+
Patch to [Find Minimum in Rotated Sorted Array](../find-minimum-in-rotated-sorted-array) is
4+
to handle the worst case
5+
6+
```
7+
[ 1 1 1 1 1 1 2 1 1 1 1]
8+
s m e
9+
```
10+
11+
when `s = m = e` we do not know which part contains the mininum number.
12+
we have to do it in brute force:
13+
14+
```
15+
min(num[s], findmin(num[s + 1 .. e]))
16+
```

find-minimum-in-rotated-sorted-array-ii/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
layout: solution
33
title: Find Minimum in Rotated Sorted Array II
4-
date: 2014-10-21 13:31:29 +0800
4+
date: 2014-10-21 13:50:45 +0800
55
---
66
{% assign leetcode_name = {{page.path | remove: '/index.md'}} %}
77
{% assign leetcode_readme = {{leetcode_name | append: '/README.md' | prepend: '_root/' }} %}

0 commit comments

Comments
 (0)