Depth First Traversal
This type of traversal explores a branch fully before moving on to a different branch. It has three main versions, depending on when you visit the node itself (the “parent”) relative to its children:
This type of traversal explores a branch fully before moving on to a different branch. It has three main versions, depending on when you visit the node itself (the “parent”) relative to its children: