Binary Search Tree encyclopedia business cards
Binary Search tree, or an empty tree, or a binary tree of the following nature: if its left subtree is not empty, the value of all nodes on the left subtree is smaller than the value of its root node. If its right subtree is not empty, the value of all nodes on the right subtree is greater than the value of its root node. Its left and right subtree are also binary sorting trees.
Search ProcessThe Query Process of the binary tree is similar to that of the sub-tree. The binary chain table is usually used as the storage structure of the binary tree. In the middle order, traverse the binary sorting tree to get an ordered sequence of keywords. an unordered sequence can be converted into an ordered sequence by constructing a binary sorting tree, the process of constructing a tree is the process of sorting unordered sequences. Each inserted new node is a new leaf node in the binary sorting tree. During the insert operation, you do not need to move other nodes. You only need to change the pointer of a node from null to non-empty. Search, insert, and delete operations are complex like tree height, O (log (N). (The above content comes from Baidu encyclopedia)