Question
Option 2 : 6, since 2^6 ≤ 100 < 2^7 and height = floor(log₂100) / 6, क्योंकि 2^6 ≤ 100 < 2^7 और ऊँचाई = floor(log₂100)
Detailed Solution
सही उत्तर 6, since 2^6 ≤ 100 < 2^7 and height = floor(log₂100) / 6, क्योंकि 2^6 ≤ 100 < 2^7 और ऊँचाई = floor(log₂100) है।
Question:
A complete binary tree contains exactly 100 nodes. Its height, measured in edges on the longest root-to-leaf path, is / एक पूर्ण बाइनरी वृक्ष में ठीक 100 नोड हैं। सबसे लंबे मूल-से-पत्ती पथ पर किनारों में मापी गई इसकी ऊँचाई है
Correct Answer: 6, since 2^6 ≤ 100 < 2^7 and height = floor(log₂100) / 6, क्योंकि 2^6 ≤ 100 < 2^7 और ऊँचाई = floor(log₂100)
A complete tree with n nodes has height floor(log₂n); floor(log₂100) = 6, consistent with levels 0–6 holding up to 127 nodes. Counting nodes or misapplying the perfect-tree formula gives the distractors. / n नोड वाले पूर्ण वृक्ष की ऊँचाई floor(log₂n) होती है; floor(log₂100) = 6, जो 0–6 स्तरों (अधिकतम 127 नोड) के अनुरूप है। नोड गिनने या पूर्ण-वृक्ष सूत्र के दुरुपयोग से भ्रामक विकल्प बनते हैं।