Last updated
Was this helpful?
Last updated
Was this helpful?
We could solve these problems iteratively using the same technique, Stack/Queue.
For solving postorder traversal iteratively, we need to store extra information "Visited Status".
For level order, we need to use Queue instead of Stack.
Related problems (follow the order to solve each problem):
Series of problems related to "N-ary Tree Traversal"