This commit is contained in:
Gyubin Han
2025-02-19 14:09:55 +09:00
parent e3c6c8b32a
commit dede0dca01
36 changed files with 555 additions and 0 deletions

11
leetcode/118.py Normal file
View File

@@ -0,0 +1,11 @@
class Solution:
def generate(self, numRows: int) -> List[List[int]]:
arr=[[1]]
for r in range(2,numRows+1):
nr=[1]
for i in range(1,r-1):
nr.append(arr[r-2][i-1]+arr[r-2][i])
nr.append(1)
arr.append(nr)
return arr