Five Lines Python Solution


  • 0
    U
     def getRow(self, rowIndex):
            L=[1]
            for j in range(rowIndex):
                L.append(0)
                L=[L[i-1]+L[i] for i in range(len(L))]
            return L
    

Log in to reply
 

Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.