In
computer science,
tree traversal (also known as
tree search) is a form of
graph traversal and refers to the process of visiting (checking and/or updating) each node in a
tree data structure, exactly once. Such traversals are classified by the order in which the nodes are visited. The following algorithms are described for a
binary tree, but they may be generalized to other trees as well.