Write the recursive function pascal_traingle
that takes an integer n
and return a list of list containing the first nth rows of the Pascal's triangle. More information about the Pascal's triangle can be found here.
pascal_traingle(5) -> [[1], [1, 1], [1, 2, 1], [1, 3, 3, 1], [1, 4, 6, 4, 1]]