Time Left - 12:00 mins

GATE CS 2019 : Algorithm Rapid Quiz -2

Attempt now to get your rank among 966 students!

Question 1

What is the number of swaps required to sort n elements using selection sort, in the worst case?

Question 2

The Breadth First Search algorithm has been implemented using the queue data structure. One possible order of visiting the nodes of the following graph if Q is starting node.

Question 3

Let G be a complete undirected graph on 4 vertices, having 6 edges with weights being 1, 2, 3, 4, 5, and 6. The maximum possible weight that a minimum weight spanning tree of G can have is ___________.

Question 4

Consider the following recurrence relation.
T(n) = T(n-1)+ 1/n if n>1
= 1 otherwise
What is the time complexity?

Question 5

Which of the following sorting algorithms has the lowest worst–case complexity?

Question 6

The graph shown below has 8 edges with distinct integer edge weights. The minimum spanning tree (MST) is of weight 36 and contains the edges: {(A, C), (B, C), (B, E), (E, F), (D, F)}. The edge weights of only those edges which are in the MST are given in the figure shown below. The minimum possible sum of weights of all 8 edges of this graph is ___________.
  • 966 attempts
  • 7 upvotes
  • 11 comments
Mar 25GATE & PSU CS