Skip to content

Commit d15812d

Browse files
authored
Update 153._find_minimum_in_rotated_sorted_array.md
1 parent 9b40844 commit d15812d

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

docs/Leetcode_Solutions/Python/153._find_minimum_in_rotated_sorted_array.md

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,22 @@ Output: 0
3232
## 解题方案
3333

3434
> 思路 1
35+
******- 时间复杂度: O(NlgN)******- 空间复杂度: O(1)******
36+
37+
python大法好,一行sb AC, beats 100%,可能测试用例大多数都是基本有序的吧
38+
39+
```python
40+
class Solution(object):
41+
def findMin(self, nums):
42+
"""
43+
:type nums: List[int]
44+
:rtype: int
45+
"""
46+
nums.sort()
47+
return nums[0]
48+
```
49+
50+
> 思路 2
3551
******- 时间复杂度: O(N)******- 空间复杂度: O(1)******
3652

3753

@@ -58,7 +74,7 @@ class Solution(object):
5874
```
5975

6076

61-
> 思路 2
77+
> 思路 3
6278
******- 时间复杂度: O(lgN)******- 空间复杂度: O(1)******
6379

6480

0 commit comments

Comments
 (0)