<awangdev>88. Search in Rotated Sorted Array II_1.java
public boolean search(int[] nums, int target) {
        if (nums == null || nums.length == 0) return false;
        int start = 0, end = nums.length - 1;
        while (start + 1 < end) {
            int mid = start + (end - start) / 2;
            if (nums[mid] == target) return true;
            if (nums[start] < nums[mid]) { 
                if (nums[start] <= target && target <= nums[mid]) end = mid;
                else start = mid;
            } else if (nums[start] > nums[mid]) { 
                if (nums[mid] <= target && target <= nums[end]) start = mid;
                else end = mid;
            } else start++; 
        }
        return nums[start] == target || nums[end] == target;
    }
public boolean var_0 ( int [ ] var_1 , int var_2 ) {
  if ( var_1 == null || var_1 . length == 0 ) return false ;
  int var_6 = 0 , var_8 = var_1 . length - 1 ;
  while ( var_6 + 1 < var_8 ) {
    int var_10 = var_6 + ( var_8 - var_6 ) / 2 ;
    if ( var_1 [ var_10 ] == var_2 ) return true ;
    if ( var_1 [ var_6 ] < var_1 [ var_10 ] ) {
      if ( var_1 [ var_6 ] <= var_2 && var_2 <= var_1 [ var_10 ] ) var_8 = var_10 ;
      else var_6 = var_10 ;
    }
    else if ( var_1 [ var_6 ] > var_1 [ var_10 ] ) {
      if ( var_1 [ var_10 ] <= var_2 && var_2 <= var_1 [ var_8 ] ) var_6 = var_10 ;
      else var_8 = var_10 ;
    }
    else var_6 ++ ;
  }
  return var_1 [ var_6 ] == var_2 || var_1 [ var_8 ] == var_2 ;
}
