Two-fork Tree:
Definition: Two a fork tree is defined in graph theory: A two-tree is a connected, loop-free graph, and the degree of each vertex is less than 3. A root binary tree also satisfies the root node's degree not less than 2.
Basic concept: Two fork tree is a recursive definition, its nodes have left and right points, logically two fork tree has five basic forms:
1> empty two-fork tree;
2> only one root node of the two-fork tree;
3> only Zuozi;
4> only the right sub-tree;
5> Complete binary tree.
Although there are many similarities between the binary tree and the tree, the binary tree is not a special case of the tree.
Tree:
Defined:
1. A tree is a collection of elements;
2. The collection can be empty. There are no elements in this tree, we call trees empty trees;
3. If the collection is not empty, then the collection has one root node, and 0 or more subtrees. The root node is connected to the root node of its subtree with one edge.
Data structures, knowledge points