Tree TraversalsNicholas Duchon: Apr 17, 2018. 
Outline

The Wiki has a nice article:
Here's a fairly simple example:
X inorder:Here are the basic algorithms:
5 10 15 20 25 30 35 40 45 50 55 60 65 70 75
X preorder:
40 20 10 5 15 30 25 35 60 50 45 55 70 65 75
X postorder:
5 15 10 25 35 30 20 45 55 50 65 75 70 60 40
X levelorder:
40 20 60 10 30 50 70 5 15 25 35 45 55 65 75
visit left node
visit this node
visit right node
visit this node
visit child nodes
visit child nodes
visit this node
enqueue root
while queue not empty
node = dequeue
visit node
enqueue child nodes
end while
push rootLevelorder implements a breadthfirst ordering of a tree or a graph (if you add code to make sure nodes are only visited once).
while stack not empty
node = pop
push child nodes
visit node
end while
Note also that pre, post and level order make sense in any tree, but inorder only makes sense in a BINARY tree.
ND.