leetcode 刷題 96 97

class Solution: def numTrees(self, n: int) -> int: f={0:1} for N in range(1,n+1): f[N] = sum([f[i-1]*f[N-i] for i in range(1, N+1)]) return f[n class Solution(o
相關文章
相關標籤/搜索