[Python] Recursive DFS.
\nclass Solution:\n    def delNodes(self, root_node: TreeNode, to_delete: List[int]) -> List[TreeNode]:\n        blacklist = set(to_delete)\n        forest = []
```\nclass Solution:\n    def delNodes(self, root_node: TreeNode, to_delete: List[int]) -> List[TreeNode]:\n        blacklist = set(to_delete)\n        forest = []\n        def helper(root, parent):\n            """\n            Delete all blacklisted nodes from the tree rooted at `root`, append all resulting\n            non-empty trees to the forest, then return root (or None if the root is blacklisted).\n            `parent` is the parent node of `root` (or None if it has no parent).\n            """\n            if root is None:\n                return None\n            \n            if root.val in blacklist:\n                helper(root.left, None)\n                helper(root.right, None)\n                return None\n            \n            root.left = helper(root.left, root)\n            root.right = helper(root.right, root)\n            if parent is None:\n                forest.append(root)\n            return root\n                  \n        helper(root_node, None)\n        return forest\n```
['Depth-First Search', 'Recursion', 'Python', 'Python3']