Inorder traversal
Appearance
In Computer science, Inorder traversal is used in Data structures, and specifically, Trees and Binary Trees.
Steps to Inorder Traversal
Given a non-empty tree,
- 1. Process the nodes in the left subtree with a recursive call
- 2. Process the root
- 3. Process the nodes in the right subtree with a recursive call
Given a binary tree PY:
The order would go D,B,G,E,A,C,F
Compare: Pre-order traversal, post-order traversal