MCPcopy Create free account
hub / github.com/HuberTRoy/leetCode / find_rotate

Method find_rotate

Array/FindMinimumInRotatedSortedArray.py:31–45  ·  view source on GitHub ↗
(self, nums)

Source from the content-addressed store, hash-verified

29"""
30class Solution(object):
31 def find_rotate(self, nums):
32 target = nums[0]
33
34 lo = 1
35
36 hi = len(nums)
37
38 while lo < hi:
39 mid = (lo + hi) // 2
40 if nums[mid] > target:
41 lo = mid + 1
42 else:
43 hi = mid
44
45 return lo
46
47 def findMin(self, nums):
48 """

Callers 1

findMinMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected