Open In App

GATE | GATE IT 2006 | Question 73

Like Article
Like
Save
Share
Report

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)

Explanation:

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


Last Updated : 28 Jun, 2021
Like Article
Save Article
Previous
Next
Share your thoughts in the comments
Similar Reads