1
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
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. The index of the parent of element X[i],i≠0 is?
A
⌊ i/2 ⌋
B
⌈ (i-1)/2 ⌉
C
⌈ i/2 ⌉
D
⌈ i/2 - 1 ⌉
2
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
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 only the root node does not satisfy the heap property, the algorithm to convert the complete binary tree into a heap has the best asymptotic time complexity of
A
O(n)
B
O(log n)
C
O(nlog n)
D
O(n log log n)
3
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
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⌉
4
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
Consider the depth-first-search of an undirected graph with 3 vertices P, Q, and R. Let discovery time d(u) represent the time instant when the vertex u is first visited, and finish time f(u) represent the time instant when the vertex u is last visited. Given that
d(P) = 5 units      f(P) = 12 units
d(Q) = 6 units      f(Q) = 10 units
d(R) = 14 unit      f(R) = 18 units
Which one of the following statements is TRUE about the graph
A
There is only one connected component
B
There are two connected components, and P and R are connected
C
There are two connected components, and Q and R are connected
D
There are two connected components, and P and Q are connected
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12