Python - simple dfs solution
\nclass Solution:\n    def delNodes(self, root: TreeNode, to_delete: List[int]) -> List[TreeNode]:\n        if not root:\n            return []\n        if not 
```\nclass Solution:\n    def delNodes(self, root: TreeNode, to_delete: List[int]) -> List[TreeNode]:\n        if not root:\n            return []\n        if not to_delete:\n            return root\n        to_delete = set(to_delete)\n        result = list()\n        def dfs(node, to_delete, result):\n            if node.left:\n                node.left = dfs(node.left, to_delete, result)\n            if node.right:\n                node.right = dfs(node.right, to_delete, result)\n            if node.val in to_delete:\n                if node.left:\n                    result.append(node.left)\n                if node.right:\n                    result.append(node.right)\n                return None\n            return node\n        if dfs(root, to_delete, result):\n            result.append(root)\n        return result\n        \n```
['Depth-First Search', 'Python3']