problemscpp
A collection of my answers to algorithm problems in c++.
静态 Public 成员函数 | 所有成员列表
leetcode::n_ary_tree_postorder_traversal::Solution类 参考

#include <leetcode.h>

静态 Public 成员函数

static vector< int > postorder (Node *root)
 

详细描述

在文件 leetcode.h1655 行定义.

成员函数说明

◆ postorder()

vector< int > leetcode::n_ary_tree_postorder_traversal::Solution::postorder ( Node root)
static

在文件 leetcode.cpp4212 行定义.

4212 {
4213 if(root == nullptr) {
4214 return {};
4215 }
4216 vector<int> ans;
4217 for(auto *child: root->children) {
4218 auto res = postorder(child);
4219 ans.insert(ans.end(), res.begin(), res.end());
4220 }
4221 ans.push_back(root->val);
4222 return ans;
4223 }
vector< int > root
Definition: acwing408.cpp:349
static vector< int > postorder(Node *root)
Definition: leetcode.cpp:4212

引用了 postorder() , 以及 acwing::acwing836_408::root.

被这些函数引用 postorder().


该类的文档由以下文件生成: