Time Left - 15:00 mins

GATE 2024 algorithm Rank Booster Quiz 22

Attempt now to get your rank among 32 students!

Question 1

What is recurrence relation for the worst case of Quicksort and time complexity in the Worst case of Quick Sort respectively?

Question 2

In the Worst case, in Selection Sort, the total number of moves represented in order of______?

Question 3

Suppose we modify merge sort in the following two ways :
• We split the input into three equal segments, recursively sort each segment and then do a three way merge of the three sorted segments to obtain a fully sorted output.
(Let us call this as 3 way merge sort)
• We split the input into two unequal segments, first segment contains only one element and other segment is biased to the right side, recursively sort each segment and then do a two way merge of the two sorted segments to obtain a fully sorted output.
(Let us call this as biased merge sort)
What can we say about the asymptotic worst case complexity of merge sort , 3 way merge sort and biased merge sort ?

Question 4

Solve the following Recurrence Relation:

Question 5

Consider the following recurrence relation

T(n) = 6 T(n/3) + n2log n

Time complexity of above relation is

Question 6

Give the correct matching for the following pairs when best cases are assumed for algorithms:

Question 7

In Quicksort, which of the following is true?

i) Ideal for sorted array

ii) Works best when input is not almost sorted.

iii) worst case is O(n2)

iv) Better than insertion sort for every type of input.

  • 32 attempts
  • 0 upvotes
  • 0 comments
Dec 5GATE & PSU CS