Question: 1 . Master s theorem is used for? * 1 point solving recurrences calculating the time complexity of any code analysing loops solving iterative relations
Masters theorem is used for?
point
solving recurrences
calculating the time complexity of any code
analysing loops
solving iterative relations
How many cases are there under Masters theorem?
point
What is the value of following recurrence.
Tn Tn Tn cn
T c
T
Where c is a positive constant
point
On
On
OnLogn
On Logn
What is the time complexity of the following recursive function:
int DoSomething int n
if n
return ;
else
return DoSomething floorsqrtn n;
Athetan
Bthetanlogn
Cthetalogn
Dthetaloglogn
point
A
B
C
D
The time complexity of the following C function is assume n
int recursive mt n
if n
return ;
else
return recursive n recursive n;
n
nlogn
n
n
point
nlogn
n
n
n
What is the asymptotic value for the recurrence equationTnTn n
point
On log n
On
On log n
On
The master theorem
point
Cannot be used for divide and conquer algorithms
Assumes the subproblems are unequal sizes
Cannot be used for asymptotic complexity analysis
Can be used if the subproblems are of equal size
Arrange the following recurrence relations in increasing order of their time capacity.
A Tn Tn
B TnTn n
C TnTn n
D TnTnn
E TnTn
Choose the correct answer from the options given below:
EABDC
AEDBC
EADBC
ABDEC
point
Option
Option
Option
Option
Under what case of Masters theorem will the recurrence relation of binary search fall?
point
It cannot be solved using masters theorem
What is the result of the recurrences which fall under second case of Masters theorem let the recurrence be given by TnaTnbfn and fnnc
point
Tn On
Tn Onc log n
Tn Ofn
Tn Onlogba
Predict output of following program
#include
int funint n
if n
return n;
else return funn;
int main
printfd fun;
return ;
point
Runtime Error
Recursion is a process in which a function calls
point
None of these
itself
another function
main function
Which of the following problems cant be solved using recursion?
point
Factorial of a number
Problems without base case
Nth fibonacci number
Length of a string
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
