Time Left - 12:00 mins

GATE CS 2019 : Algorithm Rapid Quiz -3 (App update required to attempt this test)

Attempt now to get your rank among 910 students!

Question 1

An unordered list contains n distinct elements. The number of comparisons to find an element in this list that is neither maximum nor minimum is

Question 2

Suppose P, Q, R, S, T are sorted sequences having lengths 20, 24, 30, 35, 50 respectively. They are to be merged into a single sequence by merging together two sequences at a time. The number of comparisons that will be needed in the worst case by the optimal algorithm for doing this is _____.

Question 3

Given a graph G and a minimum spanning tree T is created using any of Prim's or Kruskal's Algorithm. Now suppose that we decrease the weight of one of the edges in T. Is the graph T still minimum cost spanning tree of G or not ?

Question 4

Consider the following keys that are hashed into the hash table in the order given using the hash function mod 11.
12, 44, 13, 88, 23, 94, 11, 39, 20, 16, 5.
Assume hash table has locations from 0 to 10. If hash table uses chaining to handle the collisions, how many locations are left without hashing any element into it?

Question 5

Consider an array consisting of the following elements in unsorted order (placed randomly), but 60 as first element.
60, 80, 15, 95, 7, 12, 35, 90, 55
Quick sort partition algorithm is applied by choosing first element as pivot element. How many total number of arrangements of array integers is possible preserving the effect of first pass of partition algorithm.

Question 6

A random bit string of length n is constructed by tossing a fair coin n times and setting a bit to 0 or 1 depending on outcomes head and tail, respectively. The probability that two such randomly generated strings are not identical is
  • 910 attempts
  • 3 upvotes
  • 3 comments
Jun 29GATE & PSU CS