Discuss / Python / 两种思路

两种思路

Topic source

雷蒙德张

#1 Created at ... [Delete] [Delete and Lock User]

如果是加0之后反转,则有下列解:

    b = [1]
    while True:
        yield b
        b.append(0)
        c = [b[x]+b[-x-1] for x in range(len(b))]
        b = c

另外就是一楼大拿的拼数组思路了。


  • 1

Reply