Related concepts of data structure binary tree

1. Binary search tree (also called binary sort tree, binary search tree): all nodes of the left subtree are less than the value of the root node , all nodes of the right subtree are greater than or equal to the value of the root node , and the left and right subtrees The tree is also a binary search tree.

2. Balance tree:

3. 23 search tree: Definition: It is a multi-branch tree, the data item is at most 2, the child node is at most 3, and the child node must be 1 more than the data item

4. Red-black tree: Definition: it is either an empty tree or a binary search tree with the following properties

    1): Each node is either red or black.

    2): The root node is black.

    3): Each leaf node (NIL) is black. ( All NULL nodes are called leaf nodes, and the color is considered black )

    4): If a node is red, then its two child nodes are black.

    5): For each node, all paths from that node to its descendants include the same number of black nodes.

Guess you like

Origin blog.csdn.net/qq_35677589/article/details/112601029