Question: Given the following algorithm for determining the factorial of a given number n: factorial(n) if (n == 0) return 1 return n * (factorial -
Given the following algorithm for determining the factorial of a given number n:
factorial(n)
if (n == 0)
return 1 return n * (factorial - 1)
Find the initial condition and recurrence equation that expresses the execution time for this algorithm. Explain how you got your answer.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
