MCPcopy Create free account
hub / github.com/codedecks-in/LeetCode-Solutions / getRow

Method getRow

Python/pascals-triangle-ii.py:7–13  ·  view source on GitHub ↗
(self, k: int)

Source from the content-addressed store, hash-verified

5'''
6class Solution:
7 def getRow(self, k: int) -> List[int]:
8 res = [1]*(k+1)
9 #res[0]=1
10 for i in range(1,k):
11 for j in range(i,0,-1):
12 res[j]+=res[j-1]
13 return res

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected