You can prepare effectively for Computer Science Engineering (CSE) GATE Computer Science Engineering(CSE) 2027 Mock Test Series with this dedicated MCQ Practice Test (available with solutions) on the important topic of "Test: Asymptotic Worst Case Time & Space Complexity- 2". These 20 questions have been designed by the experts with the latest curriculum of Computer Science Engineering (CSE) 2026, to help you master the concept.
Test Highlights:
Sign up on EduRev for free to attempt this test and track your preparation progress.
A list of n string, each of length n, is sorted into lexicographic order using the merge-sort algorithm. The worst case running time of this computation is
Detailed Solution: Question 1
In quick sort, for sorting n elements, the (n/4)th smallest element is selected as pivot using an O(n) time algorithm.
Q.
What is the worst case time complexity of the quick sort?
Detailed Solution: Question 2
Consider the Quicksort algorithm. Suppose there is a procedure for finding a pivot element which splits the list into two sub-lists each of which contains at least one-fifth of the elements. Let T(n) be the number of comparisons required to sort n elements. Then
Detailed Solution: Question 3
Consider the following functions:
f(n) = 2^n
g(n) = n!
h(n) = n^logn
Q. Which of the following statements about the asymptotic behavior of f(n), g(n), and h(n) is true?
Detailed Solution: Question 4
In the following C function, let n >= m.
Q. How many recursive calls are made by this function?
Detailed Solution: Question 5
Which of the following sorting algorithms has the lowest worst-case complexity?
Detailed Solution: Question 6
Consider the following functions

Detailed Solution: Question 7
Consider the following three claims I (n + k)^m = θ(n^m), where k and m are constants II 2^(n + 1) = 0(2^n) III 2^(2n + 1) = 0(2^n) Which of these claims are correct?
Detailed Solution: Question 8
Let s be a sorted array of n integers. Let t(n) denote the time taken for the most efficient algorithm to determined if there are two elements with sum less than 1000 in s. which of the following statements is true?
Detailed Solution: Question 9
Consider the following function
Q. What is the returned value of the above function?
Detailed Solution: Question 10
The number of elements that can be sorted in time using heap sort is
Detailed Solution: Question 11
Consider the following two functions. What are time complexities of the functions?
Detailed Solution: Question 12
In quick sort, for sorting n elements, the (n/4)th smallest element is selected as pivot using an O(n) time algorithm. What is the worst case time complexity of the quick sort?
Detailed Solution: Question 13
Consider the Quicksort algorithm. Suppose there is a procedure for finding a pivot element which splits the list into two sub-lists each of which contains at least one-fifth of the elements. Let T(n) be the number of comparisons required to sort n elements. Then
Detailed Solution: Question 14
Consider the following segment of C-code:
Q. The number of comparisons made in the execution of the loop for any n > 0 is: Base of Log is 2 in all options.
Detailed Solution: Question 15
Consider the following C-program fragment in which i, j and n are integer variables.
for (i = n, j = 0; i >0; i /= 2, j += i);
Q. Let val(j) denote the value stored in the variable j after termination of the for loop. Which one of the following is true?
Detailed Solution: Question 16
The minimum number of comparisons required to find the minimum and the maximum of 100 numbers is _________________.
Detailed Solution: Question 17
Consider the following pseudo code. What is the total number of multiplications to be performed?
You have an array of n elements. Suppose you implement quicksort by always choosing the central element of the array as the pivot. Then the tightest upper bound for the worst case performance is
Detailed Solution: Question 19
Consider the following C-function:
Q. The space complexity of the above function is:
Detailed Solution: Question 20