Question 4883 – UGC NET CS 2018-DEC Paper-2
November 27, 2023OOPS
November 27, 2023Question 10964 – Data-Structures
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
Correct Answer: C
Question 204 Explanation:
If the root node is at level 0 then the level of element X[i] is ⌊log2 (i + 1)⌋.
⌊log2 i⌋
⌈log2 (i + 1)⌉
⌊log2 (i + 1)⌋
⌈log2 i⌉
Subscribe
Login
0 Comments