Row of Pascal's triangle
mediumMaths and loops20 XP
Return row n of Pascal's triangle, counting from 0. Row 0 is [1]; each number in a row is the sum of the two above it.
Examples
- Input: n = 4Output: [1, 4, 6, 4, 1]
- Input: n = 0Output: [1]
Examples use JSON: true/false/null are True/False/None in Python.