二分查找
最后返回left

class Solution {
    public int missingNumber(int[] nums) {
        int len = nums.length;
        int left = 0;
        int right = len-1;
        int mid = 0;

        while(left <= right){
            mid = (left + right) /2;
            if(nums[mid]==mid){
                left = mid +1;
            }
            else if (nums[mid] > mid){
                right = mid - 1;
            }
        }
        return left;
    }
}