We know that the two-fork tree is only a special two-fork tree, most of the nodes of the binary tree are not completely around the child, that is, many pointer fields are not fully utilized. On the other hand, when we are traversing a binary tree in some order, we get a sequence of characters, after which we can know the precursor of the node, that is to say, we can know very well the origin and the successor of any node. But this is based on the already-traversed foundation. On a binary list, we can only know the address of each node to its left and right child node, without knowing who the predecessor of a particular node is and who the successor is. To know, you have to traverse it once. Each time you need to know, you must traverse it once. Why not consider remembering these precursors and successors at the time of creation? That would be a lot of time saving.
After combining the analysis of the two angles, we can consider using those empty addresses to store the addresses of the precursors and subsequent nodes that point to the node in a traversal order. We refer to this precursor and subsequent pointer as a clue, plus a clue to the two-fork linked list called the Clue list, the corresponding two-fork tree is called the clue Two-fork tree (threaded Binary).
As shown in Figure 6-10-2, after the binary tree is iterated, the rchild in all the null pointer fields is changed to point to its successor node.
As shown in Figure 6-10-3, we take this binary tree in the middle sequence traversal, all the null pointer fields in the Lchild, to point to its predecessor nodes.
Through the figure 6-10-4 (hollow arrow solid line as the precursor, dashed black Arrows for the successor), it is easier to see that, in fact, the clue two fork tree, is tantamount to a binary tree into a two-way linked list, so that our insertion delete node, to find a node has brought convenience. So we call the process of a two-fork tree in some order to turn it into a clue two-fork tree.