OPERATIONS OF BINARY TREE
TRAVERSING-Traversing a tree means simply visiting each node of the tree exactly once.different methods are available to traverse a tree.
DEPTH FIRST TRAVERSAL-DFT is based on the idea of processing all descendents of a child node before processing the next child.The dft is classified into three common categories:
=> Preorder traversal
=> Inorder traversal
=> Post order Traverse
Breath first traversal-Breath First Traverse is based on the idea of level processing of nodes i.e. first root is processed then all nodes at level two processed and so on.nodes are processed from left to right.
DEPTH FIRST TRAVERSAL-DFT is based on the idea of processing all descendents of a child node before processing the next child.The dft is classified into three common categories:
=> Preorder traversal
=> Inorder traversal
=> Post order Traverse
Breath first traversal-Breath First Traverse is based on the idea of level processing of nodes i.e. first root is processed then all nodes at level two processed and so on.nodes are processed from left to right.
No comments:
Post a Comment