Pascal's Triangle
Each entry is the sum of the two above it; row n holds C(n, k).
Decision · step 6 of 7Multiples, Powers, Pascal: C(5, 2)
Row 5: 1 5 10 10 5 1. Each inner cell is the sum of the two above it, and the ends stay 1. Position 2 holds C(5, 2) = 10.
What you will see
Rows fill from the top; each cell is the sum of its two parents.
Cost
| Space | O(n^2) |
|---|
How you work with it here
play it through, step one change at a time, run it on your own input.
Screen readers: Numbers announce their value and role; each step announces the arithmetic performed.
Reduced motion: Values crossfade; no travelling digits.
Taught by the same lesson
Multiples, Powers, Pascal covers these too, in the same run.