1
GATE CSE 2006
MCQ (Single Correct Answer)
+1
-0.3
To implement Dijkstra’s shortest path algorithm on unweighted graphs so that it runs in linear time, the data structure to be used is:
A
Queue
B
Stack
C
Heap
D
B-Tree
2
GATE CSE 2006
MCQ (Single Correct Answer)
+1
-0.3
Consider a weighted complete graph G on the vertex set {v1, v2, ..vn} such that the weight of the edge (vi, vj) is $$2|i-j|$$. The weight of a minimum spanning tree of G is:
A
n — 1
B
2n — 2
C
$${n \over 2}$$
D
$$n^2$$
3
GATE CSE 2006
MCQ (Single Correct Answer)
+2
-0.6
The median of n elements can be found in O(n) time. Which one of the following is correct about the complexity of quick sort, in which median is selected as pivot?
A
$$\theta \,{\rm{(n)}}$$
B
$$\theta \,{\rm{(nlogn)}}$$
C
$$\theta \,{\rm{(n}}{}^2{\rm{)}}$$
D
$$\theta \,{\rm{(n}}{}^3{\rm{)}}$$
4
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
EXAM MAP
Medical
NEETAIIMS
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
Civil Services
UPSC Civil Service
Defence
NDA
Staff Selection Commission
SSC CGL Tier I
CBSE
Class 12