def prefix_average_3(array: list) -> list:
    """

    BIG-O Notation: O(n)

    :param array: list of integers
    :return: list of averages
    """
    n = len(array)
    A = [0] * n
    total = 0

    for j in range(n):
        total += array[j]
        A[j] = total / (j + 1)

    return A