One day a week, take the software designer exam with the group of brothers 02

data structure

tree

1. Concept

Maximum degree nodes of degree tree
internal node except the root and leaf
branch nodes except leaf
Total number of nodes = total degrees + 1
tree disordered
about binary subtree
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
binary tree to the root, root, dorsal root and traverse the level
prior root GEDACHS
root DEAGHCS
root DAEHSCG
level GECDAHS

Tree and binary tree conversion
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Binary sort tree (binary search tree) The Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
Insert picture description here
optimal binary tree is not unique, but its WPL value is unique.
Huffman tree, the left is small and the right is large.
Huffman code is
left 0 and right 1, marked on the path , From root to leaf

Insert picture description here
Insert picture description here

Guess you like

Origin blog.csdn.net/puyu2017/article/details/106340853