Threaded Binary Trees
Threaded Binary Trees
traversals
We have the pointers reference the next node in
indicate inorder predecessor and right child pointer lead to inorder successor
Definition
Threaded binary tree is the left subtree of a root
left_child
data
right_child
FALSE
right_th
TRUE: thread
FALSE: child
6 3 1 5 7 9 8 11 13
6 3 8
7
9
11
13
6
3 8
Output 1
7
9
11
13
6
3 8
Output 1 3
7
9
11
13
6
3 8
Output 1 3 5
7
9
11
13
6
3 8
Output 1 3 5 6
7
9
11
13
6
3 8
7
9
11
13
Output 1 3 5 6 7
6
3 8
7
9
11
13
Output 1 3 5 6 7 8
6
3 8
7
9
11
13
Output 1 3 5 6 7 8 9
6
3 8
7
9
11
13
Output 1 3 5 6 7 8 9 11
6
3 8
7
9
11
13
Output 1 3 5 6 7 8 9 11 13