OOPS
October 10, 2023DataStructures
October 10, 2023DataStructures
Question 4

The height of a tree is the length of the longest roottoleaf path in it. The maximum and minimum number of nodes in a binary tree of height 5 are
63 and 6, respectively


64 and 5, respectively


32 and 6, respectively


31 and 5, respectively

Question 4 Explanation:
Maximum number of nodes in a binary tree of height h is,
2^{h+1} – 1 = 2^{5+1} – 1 = 63
Minimum number of nodes in a binary tree of height h is
h + 1 = 5 + 1 = 6
2^{h+1} – 1 = 2^{5+1} – 1 = 63
Minimum number of nodes in a binary tree of height h is
h + 1 = 5 + 1 = 6
Correct Answer: A
Question 4 Explanation:
Maximum number of nodes in a binary tree of height h is,
2^{h+1} – 1 = 2^{5+1} – 1 = 63
Minimum number of nodes in a binary tree of height h is
h + 1 = 5 + 1 = 6
2^{h+1} – 1 = 2^{5+1} – 1 = 63
Minimum number of nodes in a binary tree of height h is
h + 1 = 5 + 1 = 6
Subscribe
Login
0 Comments