You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Solution:
def minNumberInRotateArray(self, rotateArray):
if len(rotateArray)==0:
return 0
head =0
rear = len(rotateArray)-1
while rotateArray[head]<=rotateArray[head+1]:
head+=1
return rotateArray[head+1]
Activity
zhentoufei commentedon Sep 30, 2017
哇,你的复杂度是O(n),使用二分查找的方法复杂度是O(logn)哦~你的方法也是很不错的,容易理解
Cherrymelon commentedon Sep 30, 2017
对,后来我也反应过来复杂度不一样