Question: The time complexity of the following recursive algorithm is Theta ( _ _ _ _ _ _ _ _ _ _ _ _ _

The time complexity of the following recursive algorithm is \Theta
(______________)
public static double mystery( double x , int n){
if (n <=0) return 4*x+1 ;
for ( int i =0, double prod =1.0 ; i < n ; i++) prod *= x +5*i ;
return mystery(prod+x ,3*n/4)+ mystery(prod+x+2, n/4)+ x/2-3 ;
}
Question 28Answer
a.
nlog2n
b.
nlogn
c.
n2
d.
2n

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!