Time Left - 15:00 mins
GATE 2019 - Algorithms Quiz-1 (Time Complexity )
Attempt now to get your rank among 1009 students!
Question 1
The concept of order (Big O) is important because
Question 2
Consider the following functions from positive integers to real numbers:
The CORRECT arrangement of the above functions in increasing order of asymptotic complexity is:
The CORRECT arrangement of the above functions in increasing order of asymptotic complexity is:
Question 3
What is best case and worst case time complexity respectively to find largest number that will divide both m and n ?
Question 4
Which one of the following correctly determines the solution of the recurrence relation with T(1)=T(1)=1?
T(n)=2T(n/2)+logn
Question 5
The recurrence equation
T (1) = 1
T (n) = 2T (n–1) + n, n ≥ 2
evaluates to
Question 6
Consider the following function:
int unknown(int n){
int i, j, k=0;
for (i=n/2; i<=n; i++)
for (j=2; j<=n; j=j*2)
k = k + n/2;
return (k);
}
The return value of the function is
int unknown(int n){
int i, j, k=0;
for (i=n/2; i<=n; i++)
for (j=2; j<=n; j=j*2)
k = k + n/2;
return (k);
}
The return value of the function is
- 1009 attempts
- 1 upvote
- 21 comments
Tags :
GATE & PSU CSAlgorithmsApr 7GATE & PSU CS