# Generalized steps to find tree traversal for any m-ary tree

So far I've read traversal techniques $(Pre-Order, In-Order, Post-Order)$ on binary trees. But In exam I've thrown up with a question, which requires me to find in-order traversal of a ternary tree. I got confused, Is there any generalized steps that we can follow to find traversals for any $m-ary$ tree.

• Maybe $1$st-subtree, root, $2$nd-subtree, root, $3$rd-subtree, root, $\cdots$, $m-1$th-subtree, root, $m$th-subtree. It depends on your purpose whether to process the root node every time. – hengxin Jan 10 '15 at 8:14
• For there to be an in-order traversal of a tree, there must be some order on every node's children (see 2-3 trees for an example). Then you can just perform a traversal as you would for a binary tree but visit the children in order. – James Evans Jan 11 '15 at 4:02