public class Solution {

public int binary(int [] nums, int low, int high) {

int mid = low + (high-low)/2;

if(low == high) return nums[high];

if(low > high) return Integer.MAX_VALUE;

if(nums[low] <= nums[mid]) return Math.min(nums[low], binary(nums,mid+1, high));

else return Math.min(binary(nums,low+1,mid), binary(nums, mid+1, high));

}

public int findMin(int[] nums) {

return binary(nums, 0 ,nums.length-1);

}

}