Back to Cosmos

Pascal Triangle

code/mathematical_algorithms/src/pascal_triangle/README.md

latest694 B
Original Source

Pascal Triangle

The Pascal Triangle is a triangular array of the binomial coefficients.

To build a Pascal Triangle; start at row 0 by placing a 1; then each consecutive row will have one more element, and each element will be the sum of the number above and to the left with the number above and to the right (blank entries are treated as a 0).

Example

1
1 1
1 2 1
1 3 3 1
1 4 6 4 1
1 5 10 10 5 1
1 6 15 20 15 6 1

Further Reading

Wikipedia - Pascal's Triangle


<p align="center"> A massive collaborative effort by <a href="https://github.com/OpenGenus/cosmos">OpenGenus Foundation</a> </p>