标签:while not 大小 question 数组 ret arraylist code 题目
import java.util.ArrayList; public class Solution { public int minNumberInRotateArray(int [] array) { int low = 0 ; int high = array.length - 1 ; while(low < high){ int mid = low + (high - low) / 2; if(array[mid] > array[high]){ low = mid + 1; } else if(array[mid] == array[high]){ high = high - 1; }else { high = mid; } } return array[low] ; } }
标签:while not 大小 question 数组 ret arraylist code 题目
原文地址:https://www.cnblogs.com/goodtest2018/p/12701544.html