[Data Structure] Nonlinear Structure – Tree (Basic Concept)

The standard definition of a tree: a finite set containing n (n>0) nodes.

1. Each element in the set is called a node (Node)

2. There is a special node called Root

3. The node elements other than the root node are divided into m (m>=0) disjoint sets, each of which is also a tree itself, called the subtree of the root node.

The basic concept of tree definition:

1. Each node has only one parent node (except the root node) and n (n>=0) child nodes

2. A node without a parent node is called the root node

3. The number of subtrees in a node is called the degree of the node

4. A node with a degree of 0 is called a leaf node (Leaf)

5. Non-leaf nodes are called branch nodes

6. If a node contains one or more child nodes, it is called the parent node or parent node of one or more nodes

7. The root node of the subtree contained in a node is called the child node of the node

8. Nodes with the same parent node are called sibling nodes

9. The root node level is the first level, and the level of other nodes is based on the +1 operation of the parent node, until it is added to the leaf node. The maximum level of all nodes on a tree is called the depth or height of the tree

10. The value of the maximum degree of a node in a tree is called the degree of the tree.

11. A collection of m disjoint trees is called a forest

WordPress database error: [Table 'yf99682.wp_s6mz6tyggq_comments' doesn't exist]
SELECT SQL_CALC_FOUND_ROWS wp_s6mz6tyggq_comments.comment_ID FROM wp_s6mz6tyggq_comments WHERE ( comment_approved = '1' ) AND comment_post_ID = 5068 ORDER BY wp_s6mz6tyggq_comments.comment_date_gmt ASC, wp_s6mz6tyggq_comments.comment_ID ASC

Leave a Comment

Your email address will not be published.