Can preorder and postorder traversals be used on any type of trees?
Well, yea. But you need to define formally what a &quot;type of tree&quot; could be. General trees, are described by the mathematical notion of a tree graph. Given some ordering on the nodes of the tree, and some definition of which node is the root of the tree, you can perform the &quot;pre-order&quot; and &quot;post-order&quot; traversals.
The algorithms that computes them are also very similar to the ones you are probably familiar with, with the small change that you need to iterate all children instead of just traversing on the two children (since the number of children isn't restricted here).
However, the in-order is not defined properly for trees without also defining a notion of what children are &quot;to the left&quot; of the root and what children are &quot;to the right&quot; of the root. When you give a formal definition to this idea as well, you can perform the in-order traversal as well.