Skip to content

Commit 48d44a6

Browse files
Add files via upload
1 parent a6473be commit 48d44a6

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# 36ms 92.91%
2+
class Solution:
3+
def getRow(self, rowIndex):
4+
"""
5+
:type rowIndex: int
6+
:rtype: List[int]
7+
"""
8+
if rowIndex is 0:
9+
return [1]
10+
else:
11+
temp_list = self.getRow(rowIndex - 1)
12+
return [1] + [temp_list[index] + temp_list[index + 1] for index in range(len(temp_list) - 1)] + [1]

0 commit comments

Comments
 (0)