Skip to content

Commit be45e18

Browse files
committed
commit changes to gh-pages
1 parent 34c46e4 commit be45e18

File tree

2 files changed

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

2 files changed

+56
-1
lines changed
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
## Variant of [Search in Rotated Sorted Array](../search-in-rotated-sorted-array)
2+
3+
4+
### The 3 cases in a `Rotated Sorted Array` when using binary search
5+
6+
* `s` < `m` < `e` : `min = num[s]`
7+
8+
9+
10+
```
11+
1 E
12+
2 *
13+
3 *
14+
4 *
15+
5 *
16+
6 M
17+
7 *
18+
8 *
19+
9 *
20+
10 S
21+
```
22+
23+
* `s` < `m` > `e` : min must in `m .. e`
24+
25+
26+
```
27+
1 *
28+
2 *
29+
3 M
30+
4 *
31+
5 *
32+
6 *
33+
7 S
34+
8 E
35+
9 *
36+
10 *
37+
```
38+
39+
* `s` > `m` < `e` min must in `s .. m + 1`
40+
41+
42+
```
43+
1 *
44+
2 *
45+
3 S
46+
4 E
47+
5 *
48+
6 *
49+
7 *
50+
8 M
51+
9 *
52+
10 *
53+
```
54+
55+
Now, Loop until `s` < `m` < `e`

find-minimum-in-rotated-sorted-array/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
4-
date: 2014-10-16 11:40:27+08:00
4+
date: 2014-10-16 11:56:32 +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)