Treaded Binary Tree
Treaded Binary Tree
STRUCTURES
MAHESH GOYANI
MAHATMA GANDHI INSTITUE OF TECHNICAL EDUCATION & RESEARCH CENTER
[email protected]
Half of the entries in Left Child & Right Child field will contain NULL pointer. These fields
may be used more efficiently by replacing the NULL entries by special pointers which points to
the node higher in the tree.
In a right threaded binary three each NULL right link is replaced by a special link to the
successor of that node under in-order traversal.
Using right thread we shall find that it is easy to perform an in-order traversal of binary
three.
In a Left Threaded Binary Three each NULL right link is replaced by a special link to the
predecessor of that node under in-order traversal.
Tree with right and left thread, called fully threaded tree
B C A[5] F 12
A[6]
A[7]
A[8] G -1
A[9] H -4
D E F
A[10] I -0
A[11]
A[12] J -2
A[13]
A[14]
G H I J