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- 4". 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.
Which of the following is TRUE?
Detailed Solution: Question 1
The two numbers given below are multiplied using the Booth's algorithm.
Multiplicand : 0101 1010 1110 1110
Multiplier: 0111 0111 1011 1101
How many additions/Subtractions are required for the multiplication of the above two numbers?
If we use Radix Sort to sort n integers in the range (nk/2,nk], for some k>0 which is independent of n, the time taken would be?
Detailed Solution: Question 3
The auxiliary space of insertion sort is O(1), what does O(1) mean?
Detailed Solution: Question 4
What is the value of following recurrence.
T(n) = T(n/4) + T(n/2) + cn^2
T(1) = c
T(0) = 0
Q. Where c is a positive constant
Detailed Solution: Question 5
What is the value of following recurrence. T(n) = 5T(n/5) + , T(1) = 1, T(0) = 0
Detailed Solution: Question 6
What is the worst case time complexity of following implementation of subset sum problem.
// Returns true if there is a subset of set[] with sun equal to given sum
bool isSubsetSum(int set[], int n, int sum)
{
// Base Cases
if (sum == 0)
return true;
if (n == 0 && sum != 0)
return false;
// If last element is greater than sum, then ignore it
if (set[n-1] > sum)
return isSubsetSum(set, n-1, sum);
/* else, check if sum can be obtained by any of the following
(a) including the last element
(b) excluding the last element */
return isSubsetSum(set, n-1, sum) ||
isSubsetSum(set, n-1, sum-set[n-1]);
}
Detailed Solution: Question 7
Suppose T(n) = 2T(n/2) + n, T(0) = T(1) = 1 Which one of the following is false.
a) T(n) = O(n^2)
b) T(n) = θ(nLogn)
c) T(n) = Ω(n^2)
d) T(n) = O(nLogn)
Consider the following recurrence:
Q. Which one of the following is true?
Detailed Solution: Question 9
The running time of an algorithm is represented by the following recurrence relation:
Q. Which one of the following represents the time complexity of the algorithm?
Detailed Solution: Question 10
The running time of the following algorithm
is best described by
What is the time complexity of the following recursive function:
Detailed Solution: Question 12
The time complexity of the following C function is (assume n > 0
int recursive (int n)
{
if(n == 1)
return (1);
else
return (recursive (n-1) + recursive (n-1));
}
Detailed Solution: Question 13
Consider the following recurrence T(n) = 3T(n/5) + lgn * lgn What is the value of T(n)?
Detailed Solution: Question 14
Consider the following recurrence.
Q. What is the value of recurrence?
Detailed Solution: Question 15
Which one of the following correctly determines the solution of the recurrence relation with T(1) = 1?
T(n) = 2T(n/2) + Logn
Detailed Solution: Question 16
Consider the following recurrence relation
The value of T(m2) for m ≥ 1 is
Detailed Solution: Question 17
The solution to the recurrence equation T(2k) = 3 T(2k-1) + 1, T (1) = 1, is:
Detailed Solution: Question 18
Select the correct asymptotic complexity of an algorithm with runtime T(n, n) where
T(x, c) = Θ(x) for c <= 2,
T(c, y) = Θ(y) for c <= 2, and
T(x, y) = Θ(x+y) + T(x/2, y/2)
Detailed Solution: Question 19
Let f(n) = n and g(n) = n(1+sin n), where n is a positive integer. Which of the following statements is/are correct?
I. f(n) = O(g(n))
II. f(n) = Ω(g(n))
Detailed Solution: Question 20