The depth of a complete binary tree with 'n nodes is (log is to be base two)
A. | log (n+1)-1 |
B. | log(n) |
C. | log (n-1) + 1 |
D. | log(n) + 1 |
Answer : A Explanation : If the depth is d, the number of nodes n will be 2 (d+1)-1 So, n+1 = 2(d+1) or d = log (n+1)-1 |
|
Option: A Explanation : Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. Explanation will come here. |