I can only think of one at the moment: It's a slow way of finding data. Let's say you have an employee tree, the CEO (Parent root) at the top, two children (Both managers), and each child has a further three children (Employees). If you had to find a certain employee, some trees force you to follow a certain path in order to locate them, some are more efficient that others, whilst some may take a long time.
Chat with our AI personalities
interactive python. org/rune stone/static/pyth onds/Trees/TreeTraversals . html (take the spaces out and enter into your web address)
1. pre-order b-tree traversal. 2. in-order b-tree traversal. 3. post-order b-tree traversal
Because a tree is a recursive data-structure. It's easier to write (and easier to understand) a recursive program for handling it.
In order traversal is used.
A binary search tree is already ordered. An in order traversal will give you a sorted list of nodes.
By using Depth First Search or Breadth First search Tree traversal algorithm we can print data in Binary search tree.