[Algorithm] Level Order Binary Tree Traversal (Iterative and Recursive)
Traverse a binary tree in level order is intuitive. We can initialize a queue and add elements. Every cycle you need to print out the nodes in the queue, and add their children to queue, until queue is empty. However, since the recursive solution for pre-order, in-order, and post-order traverse is quite easy, I wonder … Read more