def reverse_array_2(arr, start, end):
    """
    A method to reverse an array within the given start and end ranges

    Space complexity = O(1)
    Time complexity = O(n)/2

    :param arr: The array to reverse
    :param start: The start index within array to reverse
    :param end: The end index within array to reverse
    :return: reversed array
    """
    while start < end:
        temp = arr[start]
        arr[start] = arr[end]
        arr[end] = temp

        start += 1
        end -= 1

    return arr