Original address
The binary search tree is the data structure used to solve the memory problems of the dictionary tree. To avoid the memory footprint of unwanted nodes, each dictionary tree node no longer uses an array, but instead uses a tree-tree structure. In a three-pronged search tree, each non-null pointer of a dictionary tree node gets its own.
For example, there are four words, AB, ABBA, ABCD, and BCD, and its three-pronged search tree structure is as follows:
The three-pronged search tree consists of three arrows. The first, downward dashed arrow. By traversing this arrow, you can get a matching word. The second, left and right arrows. This arrow is traversed when the current position character does not meet the needs. The right arrow is traversed when the current position character is less than the demand, whereas the left arrow.
For example
The green arrows show how to confirm that the ABBA search tree contains the word:
The following illustration shows how to find that the three-pronged search tree does not contain the word abd:
Binary search Tree