comefrom: <awangdev>Find Peak Element_3.java
code: public int findPeakElement(int[] nums) {
          if (nums == null || nums.length <= 1) {
              return 0;
          }
          
          int n = nums.length;
          int start = 0;
          int end = nums.length - 1;
          int mid = 0;
          while (start <= end) {
              mid = start + (end - start) / 2;
              if ((mid - 1 < 0 || nums[mid] > nums[mid - 1]) && (mid + 1 >= n || nums[mid] > nums[mid + 1])) {
                  return mid;
              } else if (mid - 1 >= 0 && nums[mid] < nums[mid - 1]) {
                  end = mid - 1;
              } else {
                  start = mid + 1;
              }
          }
          return mid;
      }
masked: public int sample_funcname ( int [ ] var_0 ) {
    if ( var_0 == null || var_0 . length <= 1 ) {
      return 0 ;
    }
    int var_1 = var_0 . length ;
    int var_2 = 0 ;
    int var_3 = var_0 . length - 1 ;
    int var_4 = 0 ;
    while ( var_2 <= var_3 ) {
      var_4 = var_2 + ( var_3 - var_2 ) / 2 ;
      if ( ( var_4 - 1 < 0 || var_0 [ var_4 ] > var_0 [ var_4 - 1 ] ) && ( var_4 + 1 >= var_1 || var_0 [ var_4 ] > var_0 [ var_4 + 1 ] ) ) {
        return var_4 ;
      }
      else if ( var_4 - 1 >= 0 && var_0 [ var_4 ] < var_0 [ var_4 - 1 ] ) {
        var_3 = var_4 - 1 ;
      }
      else {
        var_2 = var_4 + 1 ;
      }
    }
    return var_4 ;
  }
  