1. Basic terminology
Degree (degree): The number of subtrees of a node is called the degree of the node, and the maximum node degree in the tree is called the degree of the tree.
Layer (Level): Count from root node, 1 for Root
Height/Depth (depth): Maximum number of layers for a node
2. Two Fork Tree nature
Full two fork tree:
Complete binary tree:
3. Storage structure of two-fork tree
1) Sequential storage structure
2) Chain-store
4. Two cross-tree traversal
1) Pre-sequence traversal: Kenzo Right sub-tree
2) Middle sequence traversal
3) Post-traversal
4) Hierarchical traversal: from top to bottom, from left to right
5. Conversion of number and two fork trees and storage structure of trees
1) The tree is transformed into a two-fork tree
2) binary tree restored to tree
3) Tree Traversal
1) Root traversal: the same as the pre-order traversal of the two-fork tree that it transforms
2) post-root traversal: the same as the middle-order traversal of its converted two-fork tree
Post-root traversal: Efbcgda F LMG H B NIC D jke A
6. The tree's storage structure
1) Parental chain notation
2) Child chain notation
3) Parent-child linked list
4) Kids Brother chain
Data structure and algorithm analysis java--tree