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⌉
Quiz of this Question
Please comment below if you find anything wrong in the above post
Attention reader! Don’t stop learning now. Practice GATE exam well before the actual exam with the subject-wise and overall quizzes available in GATE Test Series Course.
Learn all GATE CS concepts with Free Live Classes on our youtube channel.