Middle-题目20:153. Find Minimum in Rotated Sorted Array

题目原文:
Suppose a sorted array is rotated at some pivot unknown to you beforehand.

(i.e., 0 1 2 4 5 6 7 might become 4 5 6 7 0 1 2).

Find the minimum element.

You may assume no duplicate exists in the array.
题目大意:
对一个移位后的数组,求最小值。
题目分析:
遍历一遍数组无脑找。
源码(略)
成绩:
1ms,beats 2.14%,众数1ms,92.29%

阅读更多
版权声明:完整版Leetcode题解请出门左转https://github.com/cmershen1/leetcode/tree/master/docs https://blog.csdn.net/cmershen/article/details/51546304
个人分类: Leetcode
上一篇Middle-题目19:309. Best Time to Buy and Sell Stock with Cooldown
下一篇Middle-题目21:62. Unique Paths
想对作者说点什么? 我来说一句

没有更多推荐了,返回首页

关闭
关闭