1
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6

A 3-ary max heap is like a binary max heap, but instead of 2 children, nodes have 3 children. A 3-ary heap can be represented by an array as follows: The root is stored in the first location, a[0], nodes in the next level, from left to right, is stored from a[1] to a[3]. The nodes from the second level of the tree from left to right are stored from a[4] location onward. An item x can be inserted into a 3-ary heap containing n items by placing x in the location a[n] and pushing it up the tree to satisfy the heap property.

Suppose the elements 7, 2, 10 and 4 are inserted, in that order, into the valid 3- ary max heap found in the previous question. Which one of the following is the sequence of items in the array representing the resultant heap?

A
10, 7, 9, 8, 3, 1, 5, 2, 6, 4
B
10, 9, 8, 7, 6, 5, 4, 3, 2, 1
C
10, 9, 4, 5, 7, 6, 8, 2, 1, 3
D
10, 8, 6, 9, 7, 2, 3, 4, 1, 5
2
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Suppose there are $$\lceil \log n \rceil$$ sorted lists of $$\left\lfloor {{n \over {\log n}}} \right\rfloor $$ elements each. The time complexity of producing a sorted list of all these elements is :
(Hint : Use a heap data structure)
A
$$O(n \log \log n)$$
B
$$\Theta(n \log n)$$
C
$$\Omega(n \log n)$$
D
$$\Omega\left(n^{3/2}\right)$$
3
GATE CSE 2005
MCQ (Single Correct Answer)
+2
-0.6
Let G(V, E) an undirected graph with positive edge weights. Dijkstra's single-source shortest path algorithm can be implemented using the binary heap data structure with time complexity:
A
$$O\left( {{{\left| V \right|}^2}} \right)$$
B
$$O\left(|E|+|V|\log |V|\right)$$
C
$$O\left(|V|\log|V|\right)$$
D
$$O\left(\left(|E|+|V|\right)\log|V|\right)$$
4
GATE CSE 2004
MCQ (Single Correct Answer)
+2
-0.6
The elements 32, 15, 20, 30, 12, 25, 16, are inserted one by one in the given order into a max Heap. The resultant max Heap is
A
GATE CSE 2004 Algorithms - Searching and Sorting Question 22 English Option 1
B
GATE CSE 2004 Algorithms - Searching and Sorting Question 22 English Option 2
C
GATE CSE 2004 Algorithms - Searching and Sorting Question 22 English Option 3
D
GATE CSE 2004 Algorithms - Searching and Sorting Question 22 English Option 4
GATE CSE Subjects
Software Engineering
Web Technologies
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12