pre-order traversal

Visiting a node first, then its left subtree, then its right subtree.

In more detail

Because each parent comes before its children, pre-order output can rebuild the same binary search tree when re-inserted in order. It suits copying or serializing a tree.

Related terms

Taught in

References