52 total views
A binary tree can be ordered or an unordered tree, so what is the difference between these two trees. In this lesson, you will compare the ordered tree vs. unordered tree and tell the difference.
Ordered Tree Example
The name suggests that the ordered tree must be an organized tree in which nodes are in some order. What is the common ordering method?
In the figure above, for any node, its left child has less value than the node itself and the right child has a value greater than the node.
In a binary tree, when nodes are not in a particular order it is called a unordered tree.
See the root, all the left descendants of the root are less than the root value and all right descendant has a value greater than the root.
This is the primary difference between the ordered tree vs. unordered tree.
R.G.Dromey. 2008. How to Solve it by Computer. Pearson Education India.
Robert Kruse, Cl Tondo. n.d. Data Structures and Program Design in C. Pearson Education India.
Thomas H. Cormen, Charles E. Leiserson, Ronald Rivest, Clifford Stein. 2009. Introduction to Algorithms. MIT Press.