Skip to content

Commit 1baa0f7

Browse files
Time: 33 ms (98.75%), Space: 14 MB (95.14%) - LeetHub
1 parent adf455e commit 1baa0f7

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
class Solution:
2+
def findMin(self, nums: List[int]) -> int:
3+
low, high = 0, len(nums)-1
4+
while low<high:
5+
mid = (low+high)//2
6+
7+
if nums[mid]<=nums[high]:
8+
high = mid
9+
else:
10+
low = mid+1
11+
return nums[low]

0 commit comments

Comments
 (0)