标签:
public class Solution { public int findMin(int[] nums) { if (nums == null || nums.length == 0) { return 0; } int res = nums[0]; for (int i = 0; i < nums.length - 1; i++) { if (nums[i] > nums[i + 1]) { res = nums[i+1]; } } return res; } }
153 Find Minimum in Rotated Sorted Array
标签:
原文地址:http://www.cnblogs.com/77rousongpai/p/4513804.html