Back to Developer Roadmap

In-Order Traversal

src/data/roadmaps/datastructures-and-algorithms/content/[email protected]

4.0531 B
Original Source

In-Order Traversal

In order traversal is a method for traversing binary trees. This method follows a specific order: Left Node, Root Node, then Right Node (L-N-R). Starting from the leftmost node of the tree, you first visit the left subtree, then the root node, and finally the right subtree. If the tree is a binary search tree, in order traversal will output the values of the nodes in the tree in ascending order. This traversal method is recursive in nature, as it requires each subtree to be visited in the exact same way.