We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see ourdocumentation.
There was an error while loading.Please reload this page.
原题链接
constpostorder=function(root){if(root===null)return[]constres=[]functiondfs(root){if(root===null)return;for(leti=0;i<root.children.length;i++){dfs(root.children[i])}res.push(root.val)}dfs(root)returnres}