Data structures and algorithms (Zhou Peng-unpublished)-sixth tree-exercise

Source: Internet
Author: User

① Tree is not a special case of the tree?
Answer: No! Although the binary tree also belongs to a tree structure, but it is a separate definition of a tree, not a special case of the general tree. Its sub-tree has the order stipulation, divides into the Saozi right sub-tree. cannot be arbitrarily reversed.
②: What is the difference between a two-fork tree and a complete binary tree?
A: Full two fork tree is a tree with a lot of leaves, while the complete binary tree although the former n-1 layer is full, but the bottom is allowed on the right side of the lack of a number of consecutive nodes. A full two fork tree is a special case of a complete binary tree.

1. The maximum value of the degrees of each node in the tree T is called the () of the tree T.
A) height B) level c) Depth D) degree


2. The total number of nodes of a two-fork tree with a depth of K, up to ().
a) 2k-1 b) log2k c) 2k-1 D) 2k


3. There are at least () nodes in a two-fork tree with a depth of 9.
A) (b) ( C) 9 D) 29-1


Q1: What is the difference between a two-fork tree and a complete binary tree?
A1: Full two fork tree is a tree with a lot of leaves, while the full binary tree although the former n-1 layer is full, but the bottom is allowed on the right side of the lack of a number of consecutive nodes.
A full two fork tree is a special case of a complete binary tree.


Q2: Why should we study the two special forms of full two-fork tree and complete binary tree?
A1: Because only these two forms can be stored sequentially!

Q3: Set a complete binary tree with 1000 nodes, then it has () a leaf node, there is () a degree of 2 nodes, there are (1) nodes only non-empty left subtree, there are (0) nodes only non-empty right subtree.

Data structures and algorithms (Zhou Peng-unpublished)-sixth tree-exercise

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.