def binary_search_2(arr, elem, start, end):
    """

    A method to perform binary search on a sorted array.

    :param arr: The array to search
    :param elem: The element to search
    :param start: start position from where to start searching
    :param end: start position till where to search
    :return: The index at which the element is found, -1 if not found
    """
    if start <= end:
        mid = int((start + end) / 2)

        if arr[mid] == elem:
            return mid
        elif elem < arr[mid]:
            return binary_search_2(arr, elem, start, mid - 1)
        else:
            return binary_search_2(arr, elem, mid + 1, end)
    else:
        return -1