Cpp iterative solution with stack
\nclass Solution {\npublic:\n    vector<int> postorder(Node* root) {\n        if(root==NULL)\n            return vector<int>();\n        stack<Node*> st;\n     
```\nclass Solution {\npublic:\n    vector<int> postorder(Node* root) {\n        if(root==NULL)\n            return vector<int>();\n        stack<Node*> st;\n        Node *p=root;\n        st.push(p);\n        list<int> res;\n        while(!st.empty()){\n            p=st.top();\n            st.pop();\n            res.push_front(p->val);\n            for(int i=0;i<p->children.size();++i)\n                st.push(p->children[i]);\n        }\n        return vector<int>(res.begin(),res.end());\n    }\n};\n```
[]