No label this time
Pascal's triangle starts with a single 1 at the top. Every row after that begins and ends with 1, and each number in the middle is the sum of the two numbers just above it. Row 0 is 1. Row 1 is 1, 1. Row 2 is 1, 2, 1. Row 3 is 1, 3, 3, 1.
A small hint for this one. You don't need the whole triangle. To make a new row, you only ever need the row just before it, so you can keep just one row and replace it each time.
Before coding: what do I need to keep, and what can I throw away?
Building Pascal's triangle
0
1
1
2
3
4
- row
- 0
Row 0 is just a single 1.
Move 1 of 5