0
点赞
收藏
分享

微信扫一扫

2022.3.12-----leetcode.590

微笑沉默 2022-03-12 阅读 16
List<Integer> ans=new ArrayList<>();
    public List<Integer> postorder(Node root) {
        if(root==null)
            return ans;
        for(int i=0;i<root.children.size();i++)
            postorder(root.children.get(i));
        ans.add(root.val);
        return ans;
    }
举报

相关推荐

0 条评论