Tag Archives: preorder

Iterative PreOrder Tree Traversal (C++)

PreOrder Traversal means displaying the root first, then traverse left subtree, and then traverse the right subtree. Because a stack is LIFO (last in first out), we need to be careful how we insert the nodes into the stack. We … Continue reading

Posted in Coding | Tagged , , | Leave a comment