OOPS
October 10, 2023Data-Structures
October 10, 2023Data-Structures
Question 4 |
The height of a tree is the length of the longest root-to-leaf 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,
2h+1 – 1 = 25+1 – 1 = 63
Minimum number of nodes in a binary tree of height h is
h + 1 = 5 + 1 = 6
2h+1 – 1 = 25+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,
2h+1 – 1 = 25+1 – 1 = 63
Minimum number of nodes in a binary tree of height h is
h + 1 = 5 + 1 = 6
2h+1 – 1 = 25+1 – 1 = 63
Minimum number of nodes in a binary tree of height h is
h + 1 = 5 + 1 = 6
Subscribe
Login
0 Comments