C++ beginner friendly recursive DFS post-order
\n vector<TreeNode*> delNodes(TreeNode* root, vector<int>& to_delete) {\n        vector<TreeNode *> vec;\n        vector<TreeNode *> to_visit;\n      \n        
```\n vector<TreeNode*> delNodes(TreeNode* root, vector<int>& to_delete) {\n        vector<TreeNode *> vec;\n        vector<TreeNode *> to_visit;\n      \n        traverse(root, to_delete, to_visit, vec);\n        if(root)        // check if root is not null (root could be part of to_delete)\n            vec.push_back(root);\n       \n        return vec;\n    }\n    \n    void traverse(TreeNode *&root, vector<int> &to_delete, vector<TreeNode *> &to_visit, vector<TreeNode *> &vec)\n    {\n       if(root == NULL)\n           return;\n    \n        traverse(root->left, to_delete, to_visit, vec);\n        traverse(root->right, to_delete, to_visit, vec);\n       \n          if(find(to_delete.begin(), to_delete.end(),root->val ) != to_delete.end())\n          {\n                if(root->left)\n                    vec.push_back(root->left);\n             if(root->right)\n                 vec.push_back(root->right);\n             root = NULL;\n             return;\n            } \n    }\n```\nPlease UPVOTE if my approach helped you.
['Depth-First Search', 'Recursion', 'C']