What is the maximum number of nodes in a binary tree of height h, where the root is at height 0?
- A 2^h
- B 2^(h+1) - 1
- C 2h + 1
- D h^2
Explanation
A full binary tree of height h has 1 + 2 + 4 + ... + 2^h = 2^(h+1) - 1 nodes at most.
What is the maximum number of nodes in a binary tree of height h, where the root is at height 0?
A full binary tree of height h has 1 + 2 + 4 + ... + 2^h = 2^(h+1) - 1 nodes at most.