def nth_row_pascal(n):
    """
    :param: - n - index (0 based)
    return - list() representing nth row of Pascal's triangle
    """
    if n ==0:
        return [1]

    output = [1,1]
    for i in range(1, n):
        new_array = []
        new_array.append(1)
        for j in range(len(output) - 1):
            new_array.append(output[j] +  output[j+1])

        new_array.append(1)
        output = new_array

    return output