Full binary tree! = Full Binary Tree

Source: Internet
Author: User

Domestic textbook PairsFull Binary TreeDefinition:

A depth of k and 2 ^ K-1 nodes of the binary tree called full binary tree. ---- Yan Weimin "data structure (C language version)" 124 page

That is, a saturated binary tree. It can also be defined as follows:

A binary tree that meets both of the following conditions is called a full Binary Tree:

(1) Each node has either two subnodes or no subnodes;

(2) leaf nodes can only appear on the last layer.

Is a full binary tree that meets the definition of Chinese textbooks:

InternationalFull binary treeDefinition:

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. for efficiency, any Huffman coding is a full binary tree.

---- NIST: http://xlinux.nist.gov/dads/HTML/fullBinaryTree.html

It can also be defined as follows:

A binary tree that meets the following conditions is called a full Binary Tree:

Each node either has two subnodes or has no subnodes.

Is a full binary tree that complies with the NIST definition:

It can be seen that the definition of full binary tree in the world is more relaxed than that of domestic textbooks for full binary tree. It is not required that all leaves must appear at the last layer.

Full Binary Trees defined in Chinese textbooks are also defined by NIST.Perfect binary tree:

A binary tree with all leaf nodes at the same depth. All internal nodes have degree 2.

---- NIST: http://xlinux.nist.gov/dads/HTML/perfectBinaryTree.html

Domestic textbooksFull Binary TreeAnd internationally definedComplete binary treeConsistent:

A binary tree in which every level, random t possibly the deepest, is completely filled. At depth n, the height of the tree, all nodes must be as far left as possible.

---- Http://xlinux.nist.gov/dads/HTML/completeBinaryTree.html

Is a Complete 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.