How can i do it iteratively?

how can i do it iteratively?

Use a stack to keep the nodes while iterating over the tree