Time Left - 10:00 mins

GATE CS 2018 - Algorithms Quiz 2 (Searching & Sorting)

Attempt now to get your rank among 763 students!

Question 1

It is seen from the C program algorithm that the cases that can create maximum number of operations that can be executed. For this linear search and sorting, worst the case that happens when the element to be searched is not present in the algorithm.
In an algorithm, for sorting n elements, it is seen that (n/4)th smallest element is selected as pivot using an O(n) time algorithm. Find the worst case time complexity of the algorithm?

Question 2

The worst-case analysis, results in the upper bound at running time of an algorithm. When a certain variable is not present, the search() functions compares it with rest of the elements of arr[]. So what would be the worst case time complexity of linear search?

Question 3

Which of the following sorting algorithms have the minimum running time complexity in the best and average case respectively?

Question 4

The minimum number of comparisons required to determine if an integer appears more than n/2 times in a sorted array of n integers is

Question 5

Which of the following sorting algorithms has the lowest worst–case complexity?
  • 763 attempts
  • 2 upvotes
  • 30 comments
Jun 25GATE & PSU CS