Definition: Process all nodes of a tree by recursively processing the left subtree, then processing the root, and finally the right subtree.
Generalization (I am a kind of ...)
tree traversal, depth-first search.
Aggregate parent (I am a part of or used in ...)
See also postorder traversal, preorder traversal, level-order traversal, Cupif-Giannini tree traversal.
For instance, if the "processing" is just printing, a tree is printed as "(left subtree) root (right subtree)". Here is pseudocode for a binary tree:
if tree is null, return;
If you have suggestions, corrections, or comments, please get in touch with Paul Black.
Entry modified 24 August 2017.
HTML page formatted Fri Feb 23 10:06:07 2018.
Cite this as:
Paul E. Black, "in-order traversal", in Dictionary of Algorithms and Data Structures [online], Vreda Pieterse and Paul E. Black, eds. 24 August 2017. (accessed TODAY) Available from: https://www.nist.gov/dads/HTML/inorderTraversal.html