209k views
3 votes
Answer the following questions about binary trees:

(a) What is the number of nodes in a full binary tree of height 7?

(b) Is it possible to build a balanced binary tree with 500000 nodes and height 40? Explain your answer.

User Nosatalian
by
8.5k points

1 Answer

1 vote

Answer:

What is the maximum number of nodes in a binary tree of height 7?

Maximum number of nodes present in binary tree of height h is 2h−1 . Here height is the max number of nodes on root to leaf path. Here we are considering height of a tree with one node is 1. If a binary tree has 0 or 2 children, then number of leaf nodes are always one more than nodes with two children

Step-by-step explanation:

User SasaT
by
7.5k points