comefrom: <awangdev>33. Search in Rotated Sorted Array_1.java
code: public int search(int[] nums, int target) {
          if (nums == null || nums.length == 0) return -1;
          int start = 0, end = nums.length - 1;
          while (start + 1 < end) {
              int mid = start + (end - start) / 2;
              if (nums[mid] == target) return mid;
              if (nums[start] < nums[mid]) { 
                  if (nums[start] <= target && target <= nums[mid]) end = mid;
                  else start = mid;
              } else { 
                  if (nums[mid] <= target && target <= nums[end]) start = mid;
                  else end = mid;
              }
          }
          if (nums[start] == target) return start;
          if (nums[end] == target) return end;
          
          return -1;
      }
masked: public int sample_funcname ( int [ ] var_0 , int var_1 ) {
    if ( var_0 == null || var_0 . length == 0 ) return - 1 ;
    int var_2 = 0 , var_3 = var_0 . length - 1 ;
    while ( var_2 + 1 < var_3 ) {
      int var_4 = var_2 + ( var_3 - var_2 ) / 2 ;
      if ( var_0 [ var_4 ] == var_1 ) return var_4 ;
      if ( var_0 [ var_2 ] < var_0 [ var_4 ] ) {
        if ( var_0 [ var_2 ] <= var_1 && var_1 <= var_0 [ var_4 ] ) var_3 = var_4 ;
        else var_2 = var_4 ;
      }
      else {
        if ( var_0 [ var_4 ] <= var_1 && var_1 <= var_0 [ var_3 ] ) var_2 = var_4 ;
        else var_3 = var_4 ;
      }
    }
    if ( var_0 [ var_2 ] == var_1 ) return var_2 ;
    if ( var_0 [ var_3 ] == var_1 ) return var_3 ;
    return - 1 ;
  }
  