leetcode-剑指11-OK
同主站154题
address
int minArray(int* numbers, int numbersSize){
if(numbersSize == 1)
return numbers[0];
int i = 0;
while((i<numbersSize-1) && (numbers[i] <=numbers[i+1])){
i++;
}
if(i == numbersSize-1)
return numbers[0];
return numbers[i+1];
}