...

/

Challenge 2: Pascal's Triangle

Challenge 2: Pascal's Triangle

Given a specific row number return a list containing the elements of that row of the Pascal's Triangle.

Problem Statement

Implement a function that takes a number testVariable and returns the row of the Pascal’s triangle corresponding with that number.

What is Pascal’s Triangle?

Pascal’s Triangle is a triangular array of the binomial coefficients.

To build Pascal’s Triangle we start with 1 at the top, then continue placing numbers below it in a triangular pattern. Each number is the sum of the two numbers directly above it.

The entry in the nthnth row and kthkth column of Pascal’s triangle is denoted as:

(nk) ...

By Hersfold on Wikipedia