Glossary of Terms

Tree Traversal

Keyword Definition
Binary Search Tree A structure in which the key in each node is greater than all keys in its left subtree and smaller than all keys in its right subtree.
Binary Tree A tree data structure in which each node has at most two children.
Breadth-First Search A graph traversal algorithm that explores all the vertices of a graph in breadth-first order, i.e., visiting all the vertices at the same 'level' before moving on to the next 'level'.
Depth-First Search A graph traversal algorithm that explores as far as possible along each branch before backtracking.
In-Order Traversal A tree traversal algorithm that visits the left subtree first, then the root node, and finally the right subtree.
Post-Order Traversal A tree traversal algorithm that visits the left subtree first, then the right subtree, and finally the root node.
Pre-Order Traversal A tree traversal algorithm that visits the root node first, then recursively visits the left subtree and finally the right subtree.