Full Binary Tree, ideal binary tree full Binary Tree

Source: Internet
Author: User

Complete Binary Tree ):

Set the depth of a binary tree to H. Except for layer H, the other layers (1 ~ H-1) are all reached the maximum number of points, the H layer of all nodes are continuously concentrated on the leftmost, This Is The Complete Binary Tree.

 

Ideal binary tree (perfect binary tree ):

Except for the last layer without any sub-nodes, all nodes on each layer have two sub-nodes. The tree is called an ideal binary tree. The height is H (starting from 0) and contains 2 ^ (H + 1)-1 nodes.

Binary Tree is an ideal binary tree.

 

Full Binary Tree ):

In China, it actually refers to the ideal Binary Tree mentioned above. The full Binary Tree defined in the United States and internationally is different from the domestic definition. NIST defines it:

A binary tree in which each node has exactly zero or two children. In other words, every node is either a leaf or has two children.

Full Binary Tree, ideal binary tree full Binary 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.