# 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.

class Solution {
public:
int findMin(vector<int>& nums) {
int len = nums.size();
if (len == 1) return nums[0];
int left = 0, right = len-1;
while (nums[left] > nums[right]) {
int mid = (left + right) / 2;
if (nums[mid] > nums[right]) {
left = mid + 1;
} else {
right = mid;
}
}
return nums[left];
}
};

• 本文已收录于以下专栏：

## 【leetcode】153. Find Minimum in Rotated Sorted Array

【leetcode】153. Find Minimum in Rotated Sorted Array

## 【leetcode】No.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 mig...

## 153. Find Minimum in Rotated Sorted Array\229. Majority Element II\Moore's voting algorithm

Find Minimum in Rotated Sorted Array 题目描述 代码实现153. Find Minimum in Rotated Sorted Array题目描述一个已经排好序的数...

## Leetcode 153. Find Minimum in Rotated Sorted Array

Suppose an array sorted in ascending order is rotated at some pivot unknown to you beforehand.(i.e.,...

## ※ Leetcode - Binary Search - 153. Find Minimum in Rotated Sorted Array（二分查找）

1. Problem Description Suppose a sorted array is rotated at some pivot unknown to you beforehand.   ...

## [leetcode 153]Find Minimum in Rotated Sorted Array----求旋转数组的最小值

Question: Suppose a sorted array is rotated at some pivot unknown to you beforehand. (i.e., ...

## leetcode解题之153&154. Find Minimum in Rotated Sorted Array版（在旋转的数组中查找最小数字）

leetcode解题之153&154. Find Minimum in Rotated Sorted Array版（在旋转的数组中查找最小数字）

## 【LeetCode-面试算法经典-Java实现】【153-Find Minimum in Rotated Sorted Array（找旋转数组中的最小数字）】

【153-Find Minimum in Rotated Sorted Array（找旋转数组中的最小数字）】【LeetCode-面试算法经典-Java实现】【所有题目目录索引】原题　　Suppose...

## Find Minimum in Rotated Sorted Array - LeetCode 153

举报原因： 您举报文章：深度学习：神经网络中的前向传播和反向传播算法推导 色情 政治 抄袭 广告 招聘 骂人 其他 (最多只允许输入30个字)