Data Structure Review 4 tree

Source: Internet
Author: User

1. Two Fork search tree

Characteristics:

1. Each element has a key, and each element must have a different key.

2. The key < root of the left subtree, the key> root of the right sub-tree.

3. The subtree still satisfies the conditions.

Indexed binary search tree: The field with Leftsize on the left side indicates the number of left-side nodes +1.

Insert: Compare the key of the inserted node and the root node in turn

Delete: 1.leaf2. Only one end has a node node3. Node deletion node with nodes at both ends is replaced with the smallest left or right end.

The height of the tree determines the degree of responsibility for the insertion, and the optimal height is the log2 base N.

2. Balance Search binary Tree AVL tree

1. is a binary search tree. 2.| Height difference between left and right side of hl-hr| <=1;

Data Structure Review 4 tree

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.