---- nonlinear structure tree
definition:
1. there is only one root node called
2. There are several disjoint sub-tree, the tree itself is a sub-tree
Popular definition:
1. The tree has nodes and edges (pointer) Composition
2. Each node has only one parent but can have multiple child nodes
3. But there is one exception to the node, the node has no parent, is called the root node
Parent node, or a parent node (parent): If a node comprising a child node, this node is called a parent node to its child nodes
Child node or child node (child): the root node of a subtree containing this node is called a child node
Sibling (Sibling): having the same parent node is referred to as a cross-sibling nodes;
Ancestor node : All nodes on branches from the root to that node via
Sons : a node in the subtree rooted at a node referred to in any of the descendant node.
Cousins
Level node : from the definition of the start from the root, the root of the first layer, children of the root of the second layer, and so on
Tree height or depth (Depth) maximum level of nodes in the tree:
Terminal node or leaf node : node has no child nodes, i.e. the node of degree 0
A branch node or a terminal node : node has child nodes, i.e., 0 degree is not
Node degree (Degree) : a number of nodes contained in subtrees of the node is called
Of the tree : a tree, the maximum degree of the nodes of the tree is called
Tree Category:
General Tree : Any child of a node number is not limited
Binary Tree : Any child of a node number of a maximum of two, and can not change the position of a child node
classification:
General binary tree :
Full binary tree : the tree without increasing the number of layers of the premise, you can not add more nodes of a binary tree
Complete binary tree : If you just delete the bottom right-most number of consecutive full binary tree node, the formation of such a binary tree is complete binary tree complete binary tree contains full binary tree (ie, a node is not deleted)
Forest : a set of n disjoint tree, that is the root of N