comefrom: <awangdev>1060. Missing Element in Sorted Array_2.java
code: public int missingElement(int[] nums, int k) {
          
          int start = 0, end = nums.length - 1;
          int count = nums[end] - nums[0] - end;
          if (count < k) {
              return nums[end] + k - count;
          }
          
          while (start + 1 < end) {
              int mid = start + (end - start) / 2;
              count = nums[mid] - nums[start] - (mid - start);
              if (count >= k) {
                  end = mid;
              } else {
                  start = mid;
                  k -= count;
              }
          }
          return nums[start] + k;
      }
masked: public int sample_funcname ( int [ ] var_0 , int var_1 ) {
    int var_3 = 0 , var_6 = var_0 . length - 1 ;
    int var_7 = var_0 [ var_6 ] - var_0 [ 0 ] - var_6 ;
    if ( var_7 < var_1 ) {
      return var_0 [ var_6 ] + var_1 - var_7 ;
    }
    while ( var_3 + 1 < var_6 ) {
      int var_9 = var_3 + ( var_6 - var_3 ) / 2 ;
      var_7 = var_0 [ var_9 ] - var_0 [ var_3 ] - ( var_9 - var_3 ) ;
      if ( var_7 >= var_1 ) {
        var_6 = var_9 ;
      }
      else {
        var_3 = var_9 ;
        var_1 -= var_7 ;
      }
    }
    return var_0 [ var_3 ] + var_1 ;
  }
  