Simple [C++] Postorder Solution
\n```\nclass Solution {\npublic:\n    vector res;\n    vector delNodes(TreeNode root, vector& vec) \n    {\n        TreeNode node = dfs(root,vec);\n        if(n
\n```\nclass Solution {\npublic:\n    vector<TreeNode*> res;\n    vector<TreeNode*> delNodes(TreeNode* root, vector<int>& vec) \n    {\n        TreeNode* node = dfs(root,vec);\n        if(node)\n            res.push_back(node);\n        return res;\n    }\n    TreeNode* dfs(TreeNode* root, vector<int>& vec)\n    {   \n        if(root)\n        {\n            root->left = dfs(root->left,vec);\n            root->right= dfs(root->right,vec);\n            \n            if(std::find(vec.begin(),vec.end(),root->val)!=vec.end())\n            {\n                if(root->left)\n                    res.push_back(root->left);\n                \n                if(root->right)\n                    res.push_back(root->right);\n                \n                return NULL;\n            }\n        }           \n        return root;   \n    }\n};
[]