递归解法错了 加了两句话 if root.right != None: self.DFS(root.right, result, path+[root.right.val])
1

相关推荐

牛客网
牛客企业服务