def recursive(array, element, left=0, right=None, sort=False):
    """
    Perform Binary Search by Iterative Method.
    :param array: Iterable of elements.
    :param left: start limit of array.
    :param right: end limit of array.
    :param element: element to be searched.
    :param sort: True will sort the array first then search, By default = False.
    :return: returns value of index of element (if found) else return None.
    """

    if sort:
        array.sort()
    right = len(array) - 1 if right is None else right
    if right >= left:
        mid = (right + left) // 2
        if array[mid] == element:
            return mid
        elif array[mid] > element:
            return recursive(array, element, left, mid - 1)
        else:
            return recursive(array, element, mid + 1, right)
    else:
        return None