1
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
An array of n numbers is given, where n is an even number. The maximum as well as the minimum of these n numbers needs to be determined. Which of the following is TRUE about the number of comparisons needed?
A
At least 2n – c comparisons, for some constant c, are needed.
B
At most 1.5n – 2 comparisons are needed.
C
At least n log2 n comparisons are needed.
D
None of the above.
2
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
In an unweighted, undirected connected graph, the shortest path from a node S to every other node is computed most efficiently, in terms of time complexity by
A
Dijkstra’s algorithm starting from S.
B
Warshall’s algorithm
C
Performing a DFS starting from S.
D
Performing a BFS starting from S.
3
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
Suppose the letters a, b, c, d, e, f have probabilities 1/2, 1/4, 1/8, 1/16, 1/32, 1/32 respectively. What is the average length of Huffman codes?
A
3
B
2.1875
C
2.25
D
1.9375
4
GATE CSE 2007
MCQ (Single Correct Answer)
+2
-0.6
Let w be the minimum weight among all edge weights in an undirected connected graph. Let e be a specific edge of weight w . Which of the following is FALSE?
A
There is a minimum spanning tree containing e.
B
If e is not in a minimum spanning tree T, then in the cycle formed by adding e to T, all edges have the same weight.
C
Every minimum spanning tree has an edge of weight w .
D
e is present in every minimum spanning tree.
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