First, the nature of binary tree
Properties of one: i-th layer in the binary tree has at most 2 '(i-1) th node
Two properties: a binary tree of depth k at most 2 (k th) -1 nodes
Three properties: an arbitrary binary tree T, which if the number of terminal nodes is N, the number of nodes of degree 2 is N2, then N = N2 + 1
Second, with full binary tree complete binary tree
K and has a depth of 2 to the power of k -1 nodes of a binary tree called a full binary tree
is popular, in addition to the binary tree is a leaf node, the other nodes are around children
of depth k with n nodes of a binary tree , if and only if each of which nodes are associated with a full binary tree of depth k numbered 1 to n correspondence node, called a complete binary tree
Third, the binary tree storage structure
1. The structure of the memory sequence: according to the node to the next, stores the order from left to right
2. Storage Structure
lchild data rchild
data
↙ ↘
lchild rchild
Usually binary tree data structure chain domain, left child and right child
trigeminal link is one more point to the root node pointer