Question:
The maximum number of nodes in a binary tree of depth (height) \(h\) (where the root is at depth 0) is:
गहराई (ऊँचाई) \(h\) वाले बाइनरी ट्री में नोड्स की अधिकतम संख्या क्या होती है (जहाँ रूट की गहराई 0 है)?
Options:
- \(2^{h+1} – 1\)
- \(2^h – 1\)
- \(2^h\)
- \(2^{h-1} + 1\)
- \(2^{h+1} – 1\)
- \(2^h – 1\)
- \(2^h\)
- \(2^{h-1} + 1\)
Correct Answer: a)
Explanation:
At depth \(i\), max nodes is \(2^i\).
Total maximum nodes = \(\sum_{i=0}^{h} 2^i = 2^{h+1} – 1\) (Option a).
ऊँचाई \(h\) वाले बाइनरी ट्री में अधिकतम नोड्स = \(2^{h+1} – 1\) होते हैं (विकल्प a)।