I know inorder traversal works like this:
- Traverse the left subtree.
- Visit the root.
- Traverse the right subtree.
But what if we have an algorithm that does the following
- Traverse the right subtree.
- Visit the root.
- Traverse the left subtree.
Would such a tree traversal be consdered inorder as well?
It will still be an inorder traversal. Inorder is simetrical.
From wikipedia:
Reference.