The sixth layer has a complete binary nine leaf node (the root of the first layer), the number of nodes up to the number of

analysis:

method one:

Depending on the nature of a binary tree of nodes on the i-th layer up to i ^ 2 (i> = 0, so the first layer is a i = 0) th, the sixth layer so that the number of nodes up to 2 ^ 5 = 32, according to the sixth floor meaning of the questions have nine leaf nodes, suggesting that there is a seventh layer, the sixth layer nodes minus nine leaf nodes, and the remaining 23 sub-tree node has left and right, so the first seven 23 * 2 = 46 nodes, the total number of nodes = 2 ^ 2 ^ 0 + 1 + 2 ^ 2 + 2 ^ 3 ^ 4 + 2 ^ 2 + 5 + 46 = 109

Method Two:

Points are summarized seven points summarized = - leaf sixth layer of nodes = 2 * (2 ^ 7-1) * 2 = 109 -9

Guess you like

Origin blog.csdn.net/weixin_43224539/article/details/92400661