LeetCode--590--easy--NaryTreePostorderTraversal
package com.app.main.LeetCode.tree; import com.app.main.LeetCode.prebase.Node; import java.util.ArrayList; import java.util.List; import java.util.Stack; /** * 590 * * easy * * https://leetcode.com/problems/n-ary-tree-postorder-traversal/ * Given an n-ary tree, return the postorder traversal of its nodes' values. Nary-Tree input serialization is represented in their level order traversal, each group of children is separated by the null value (See examples). Follow up: Recursive solution is trivial, could you do it iteratively? Example 1: Input: root = [1,null,3,2,4,null,5,6] Output: [5,6,3,2,4