题解 | #旋转数组的最小数字#Java最简单解法
旋转数组的最小数字
http://www.nowcoder.com/practice/9f3231a991af4f55b95579b44b7a01ba
import java.util.ArrayList; public class Solution { public int minNumberInRotateArray(int [] array) { int pre = Integer.MIN_VALUE; for( int temp : array) { if(temp < pre) { return temp; } pre = temp; } return array[0]; } }