def binary_search(arr, low, high):
    """    
    Purpose : This function find the smallest element using Binary search
    
    Input : 
        arr  : The array from which the smallest element has to be returned
        low  : Starting index of the array
        high : End index of the array  
        
    Output : Smallest element in the array 
    """ 
    
    # Check for empty array
    if (low > high):
        raise IndexError('Array is empty')
    
    # Finds the smallest element
    while(low < high):
        mid = (low + (high-low)//2)
        
        if arr[mid] < arr[mid+1]:
            high = mid
        else:
            low = mid + 1
    return arr[low]