# Binomial Coefficient 40 ms runtime beats 91.77 % of Python 3 submissions.

```
class Solution:
def factorial(self, n):
if n in [0, 1]:
return 1
return n * Solution.factorial(self, n - 1)
def getRow(self, n):
"""
:type rowIndex: int
:rtype: List[int]
"""
row = []
for k in range(n + 1):
row.append(self.factorial(n) // (self.factorial(k) * self.factorial(n - k)))
return row
```