1.
A. Write a recursive brute force algorithm that calculates an.
B. Write the java code that does the calculation.
C. What is the recurrence relation for the number of multiplications?
D. What is the efficiency class of the algorithm?
A)Here is the brute force algorithm
B)Here is the java code
C)
Recurrence relation is :
power(a,n)=n*power(a,n-1)
D)
efficency class of the algorithm is O(n).
Get Answers For Free
Most questions answered within 1 hours.