<garvit244>81_1.py
def search( nums, target):
    left, right = 0, len(nums) -1
    while left <= right:     
        mid = (left + right) / 2
        if nums[mid] == target:
            return True
        if nums[left] < nums[mid]:
            if nums[left] <= target < nums[mid]:
                right = mid - 1
            else:
                left = mid + 1
        elif nums[mid] < nums[left]:
            if nums[mid] < target <= nums[right]:
                left = mid + 1
            else:
                right = mid -1
        else:
            left += 1
    
    return False
def sample_funcname ( var_0 , var_1 ) :
    var_3 , var_6 = 0 , len ( var_0 ) - 1
    while var_3 <= var_6 :
        var_8 = ( var_3 + var_6 ) / 2
        if var_0 [ var_8 ] == var_1 :
            return True
        if var_0 [ var_3 ] < var_0 [ var_8 ] :
            if var_0 [ var_3 ] <= var_1 < var_0 [ var_8 ] :
                var_6 = var_8 - 1
            else :
                var_3 = var_8 + 1
        elif var_0 [ var_8 ] < var_0 [ var_3 ] :
            if var_0 [ var_8 ] < var_1 <= var_0 [ var_6 ] :
                var_3 = var_8 + 1
            else :
                var_6 = var_8 - 1
        else :
            var_3 += 1
    return False
