摘要:
题一: 提交:层序遍历bfs O(N) O(N) class Solution: def levelOrder(self, root: TreeNode) -> List[int]: if not root : return [] queue = [root] res = [] while queu 阅读全文
摘要:
题目描述: 方法:动态规划 完全背包问题 class Solution: def waysToChange(self, n: int) -> int: coins = [1,5,10,25] dp = [0] * (n+1) dp[0] = 1 for coin in coins: for i in 阅读全文