why am i wrong


  • 0
    G

    class Solution(object):
    def generate(self, numRows):
    """
    :type numRows: int
    :rtype: List[List[int]]
    """

        x=[]
        row=[1]
        
        for i in range(numRows):
            x.append(row)
            row=[x+y for x,y in zip([0]+row,row+[0])]
            
        return x

  • 0
    O

    you're not wrong


Log in to reply
 

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