Read about Pascal's Triangle here
Write a function that, given a depth (n), returns an array representing Pascal's Triangle to the n-th level.
For example:
pascalsTriangle(4) #=> [1, 1, 1, 1, 2, 1, 1, 3, 3, 1];
Read about Pascal's Triangle here
Write a function that, given a depth (n), returns an array representing Pascal's Triangle to the n-th level.
For example:
pascalsTriangle(4) #=> [1, 1, 1, 1, 2, 1, 1, 3, 3, 1];