def compute_pascal(n):
    """
    Compute the nth row of Pascal’s triangle

    Parameters
    ----------
    n : integer
        which row too compute

    Returns
    -------
    pascal_n : a list of integers
        The nth row of Pascal’s triangle.

    """
    pascal_n = [1]
    prev = 1
    for k in range(1,n+1):
        cur = prev * (n+1-k)/k
        pascal_n.append(int(cur))
        prev = cur
    return(pascal_n)