1
GATE CSE 2021 Set 1
MCQ (Single Correct Answer)
+2
-0.67
Change Language

Consider the following array.

23

32

45

69

72

73

89

97


Which algorithm out of the following options uses the least number of comparisons (among the array elements) to sort above array in ascending order?
A
Insertion sort
B
Selection sort
C
Quicksort using the last element as pivot
D
Merge sort
2
GATE CSE 2021 Set 1
Numerical
+2
-0.67

Consider the following undirected graph with edge weights as shown:

GATE CSE 2021 Set 1 Algorithms - Dynamic Programming Question 3 English
The number of minimum-weight spanning trees of the graph is ______

Your input ____
3
GATE CSE 2021 Set 1
MCQ (Single Correct Answer)
+2
-0.67

Consider the following recurrence relation.

$$T(n) = \left\{ {\begin{array}{*{20}{c}} {T(n/2) + T(2n/5) + 7n \ \ \ if\ n > 0}\\ {1\ \ \ \ \ \ \ if\ n = 0} \end{array}} \right.$$

Which one of the following option is correct?

A
T(n) = Θ(n log n)
B
T(n) = Θ(n5/2)
C
T(n) = Θ((log n)5/2)
D
T(n) = Θ(n)
4
GATE CSE 2021 Set 1
MCQ (Single Correct Answer)
+2
-0.67

Let G = (V, E) be an undirected unweighted connected graph. The diameter of G is defined as:

diam(G) = $$\displaystyle\max_{u, x\in V}$$ {the length of shortest path between u and v}

Let M be the adjacency matrix of G.

Define graph G2 on the same set of vertices with adjacency matrix N, where

$$N_{ij} =\left\{ {\begin{array}{*{20}{c}} {1 \ \ \text{if} \ \ {M_{ij}} > 0 \ \ \text{or} \ \ P_{ij} > 0, \ \text{where} \ \ P = {M^2}}\\ {0, \ \ \ \ \ \text{otherwise}} \end{array}} \right.$$

Which one of the following statements is true?

A
diam(G) < diam(G2) ≤ diam(G)
B
$$\left\lceil {diam(G)/2} \right\rceil $$ < diam(G2) < diam(G)
C
diam(G2) ≤ $$\left\lceil {diam(G)/2} \right\rceil $$
D
diam(G2) = diam(G)
EXAM MAP
Medical
NEET
Graduate Aptitude Test in Engineering
GATE CSEGATE ECEGATE EEGATE MEGATE CEGATE PIGATE IN
CBSE
Class 12