GATE | GATE IT 2006 | Question 73

An array X of n distinct integers is interpreted as a complete binary tree. The index of the first element of the array is 0. If the root node is at level 0, the level of element X[i], i ≠ 0, is
(A) ⌊log2 i⌋
(B) ⌈log2 (i + 1)⌉
(C) ⌊log2 (i + 1)⌋
(D) ⌈log2 i⌉

Answer: (C)


Quiz of this Question
Please comment below if you find anything wrong in the above post

My Personal Notes arrow_drop_up

Article Tags :

Be the First to upvote.

Please write to us at to report any issue with the above content.