def iterative(n: int) -> int:
    """
    This approach uses Bottom Up Dynamic Programming Technique
    The last two values are the only needed to compute the next
    value. So we just need to save those in order to build
    the Fibonacci sequence.

    This approach requires less memory than memoization.
    """
    last: int = 1
    next: int = 0

    for _ in range(n):
        last = last + next
        next = last - next

    return next