0
3.3kviews
Explain threaded Binary tree
1 Answer
written 5.9 years ago by | • modified 5.9 years ago |
In a linked list representation of binary trees, there are more null links than the node links. Such null links are replaced by pointers called as threads, such a tree is called as Threaded Binary Tree.
A left null link of a node is replaced with the address of its in-order predecessor.
A right null link of a node is replaced with the address of its in-order successor.
Example
There are two types of Threaded Binary Trees:-
a. Single Threaded: each node is threaded towards either(right)' the in-order predecessor or' successor.
b. Double threaded: each node is threaded towards both(left & right)' the in-order predecessor and' successor.