Formula to find number of nodes in binary tree
Answers
Answered by
0
дзякуючы дзі я трохі трохі трохі трохі трохі трохі трохі
Answered by
0
Answer:
Step-by-step explanation:
If binary tree has height h, maximum number of nodes will be when all levels are completely full. Total number of nodes will be 2^0 + 2^1 + …. 2^h = 2^(h+1)-1. For example, the binary tree shown in Figure 2(b) with height 2 has 2^(2+1)-1 = 7 nodes.
Similar questions