public static int biggerThan(int[] nums, int key){
        if(nums == null || nums.length == 0) return -1;
        int low = 0, high = nums.length -1;
        while(low <= high){
            int mid = (low + high) >> 1;
            if(key >= nums[mid]){
                low = mid + 1;
            }else {
                high = mid - 1;
            }
        }
        return low >= nums.length ? -1 : low;
    }