def binary_search(lst: list, n: int) -> int:
    """Search any element in a list using binary search and return its index
        or -1

    Args:\n
        lst (list): List of elements
        n (int or any): element to find

    Returns:\n
        int: index of the element
    """
    left_index = 0
    right_index = len(lst) - 1
    mid_index = 0

    while left_index <= right_index:
        mid_index = (left_index + right_index) // 2
        if lst[mid_index] == n:
            return mid_index
        if lst[mid_index] < n:
            left_index = mid_index + 1
        else:
            right_index = mid_index - 1
    return -1