Intuitive explanation of binary tree traversals without recursion
<p>I have seen many articles and books (and Stack Overflow answers) that show how to do preorder, inorder, and postorder depth-first tree traversals iteratively, using an explicit stack instead of recursion.
For example: <a href="https://en.wikipedia.org/wiki/Tree_traversal#Depth-first_search_2" rel="noreferrer">https://en.wikipedia.org/wiki/Tree_traversal#Depth-first_search_2</a></p>

<p>Preorder traversal is simple, but I think the others are complicated and far from obvious.</p>

<p>Is there any source (preferably article or book) that explains these algorithms intuitively, so you can see how someone would have come up with them in the first place?</p>