Easy Java code, 1 ms, faster than 99.46%
\n public List<TreeNode> delNodes(TreeNode root, int[] arr) {\n       HashSet<Integer> map = new HashSet<>();\n            for(int i = 0; i < arr.length; i++) {
```\n public List<TreeNode> delNodes(TreeNode root, int[] arr) {\n       HashSet<Integer> map = new HashSet<>();\n            for(int i = 0; i < arr.length; i++) {\n                    map.add(arr[i]);\n            }\n            List<TreeNode> ans = new ArrayList<>();\n            TreeNode val = delNodes(root, map, ans);\n            if(val != null) ans.add(val);\n            return ans;\n    }\n        \n        public TreeNode delNodes(TreeNode root, HashSet<Integer> map, List<TreeNode> ans) {\n        if(root == null) return null;\n                \n               TreeNode left =  delNodes(root.left, map, ans);\n                TreeNode right = delNodes(root.right, map, ans);\n                \n                if(map.contains(root.val)) {\n                        if(left != null)ans.add(left);\n                        if(right != null) ans.add(right);\n                        return null;\n                }\n                \n                root.left = left;\n                root.right = right;\n                \n                return root;\n            \n    }\n```
[]