class Solution: def maxValue(self, root: TreeNode, k: int) -> int: def dfs(root): # 空节点价值全为0 res = [0]*(k+1) if not root: return res # 递归获取左右节点的状态 lef Read More
posted @ 2022-08-11 14:05 meetviolet Views(56) Comments(0) Diggs(0) Edit