File tree Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Expand file tree Collapse file tree 2 files changed +8
-4
lines changed Original file line number Diff line number Diff line change 1
1
# 11. 旋转数组的最小数字
2
2
3
- [ NowCoder] ( https://www.nowcoder.com/practice/9f3231a991af4f55b95579b44b7a01ba?tpId=13&tqId=11159&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github )
3
+ ## 题目链接
4
+
5
+ [ 牛客网] ( https://www.nowcoder.com/practice/9f3231a991af4f55b95579b44b7a01ba?tpId=13&tqId=11159&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github )
4
6
5
7
## 题目描述
6
8
10
12
11
13
## 解题思路
12
14
13
- 将旋转数组对半分可以得到一个包含最小元素的新旋转数组,以及一个非递减排序的数组。新的旋转数组的数组元素是原数组的一半 ,从而将问题规模减少了一半,这种折半性质的算法的时间复杂度为 O(logN)(为了方便,这里将 log<sub >2</sub >N 写为 logN) 。
15
+ 将旋转数组对半分可以得到一个包含最小元素的新旋转数组,以及一个非递减排序的数组。新的旋转数组的长度是原数组的一半 ,从而将问题规模减少了一半,这种折半性质的算法的时间复杂度为 O(log<sub >2</sub >N) 。
14
16
15
17
<div align =" center " > <img src =" https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/424f34ab-a9fd-49a6-9969-d76b42251365.png " width =" 300px " > </div ><br >
16
18
Original file line number Diff line number Diff line change 1
1
# 11. 旋转数组的最小数字
2
2
3
- [ NowCoder] ( https://www.nowcoder.com/practice/9f3231a991af4f55b95579b44b7a01ba?tpId=13&tqId=11159&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github )
3
+ ## 题目链接
4
+
5
+ [ 牛客网] ( https://www.nowcoder.com/practice/9f3231a991af4f55b95579b44b7a01ba?tpId=13&tqId=11159&tPage=1&rp=1&ru=/ta/coding-interviews&qru=/ta/coding-interviews/question-ranking&from=cyc_github )
4
6
5
7
## 题目描述
6
8
10
12
11
13
## 解题思路
12
14
13
- 将旋转数组对半分可以得到一个包含最小元素的新旋转数组,以及一个非递减排序的数组。新的旋转数组的数组元素是原数组的一半 ,从而将问题规模减少了一半,这种折半性质的算法的时间复杂度为 O(logN)(为了方便,这里将 log<sub >2</sub >N 写为 logN) 。
15
+ 将旋转数组对半分可以得到一个包含最小元素的新旋转数组,以及一个非递减排序的数组。新的旋转数组的长度是原数组的一半 ,从而将问题规模减少了一半,这种折半性质的算法的时间复杂度为 O(log<sub >2</sub >N) 。
14
16
15
17
<div align =" center " > <img src =" https://cs-notes-1256109796.cos.ap-guangzhou.myqcloud.com/424f34ab-a9fd-49a6-9969-d76b42251365.png " width =" 300px " > </div ><br >
16
18
You can’t perform that action at this time.
0 commit comments