标签:return 定义 turn 输出 describe 开始 递增 判断 question
import java.util.ArrayList; public class Solution { public int minNumberInRotateArray(int [] array) { int low = 0; int hight = array.length - 1; if(array.length == 0){ return 0; } while(low < hight){ int mid = low + (hight - low) / 2; if(array[mid] < array[hight]){ hight = mid; }else if(array[mid] == array[hight]){ hight--; }else{ low = mid + 1; } } return array[low]; } }
标签:return 定义 turn 输出 describe 开始 递增 判断 question
原文地址:https://www.cnblogs.com/codingLiu/p/12684826.html