What do you understand by tree transversal?
Once the tree is created, there is a need to retrieve information from it. While there is no problem in iteratively going over the tree represented as a heap, other kinds of tree-based structures require a way to find information, known as tree traversal. It is an essential part of many algorithms that work with tree-structures.
The idea lies in somehow visiting each tree-node exactly once. The main types of traversals are in-order traversal (resulting in infix notation), pre-order traversal (resulting in prefix notation), and, post-order traversal (resulting in postfix notation), while the algorithms can be generally classified as iterative and recursive.
P.S Transversal is the same thing as Traversal.
Comments
Leave a comment