import java.util.ArrayList;
public class Solution {
    public int minNumberInRotateArray(int [] array) {
         if(array.length==0) return 0;
         //升序排序
         for(int i = 0;i < array.length; i++){
             for(int j = array.length - 1;j>i;j--){
                 if(array[i] > array[j]){
                     int tmp = array[i];
                     array[i] = array[j];
                     array[j] = tmp;
                 }
             }
         }
         return array[0];
    }
}