Question: The following algorithm computes n!: int factorial(n int) { } if (n = 1) return 1; return factorial (n-1) n; What is a reasonable
The following algorithm computes n!: int factorial(n int) { } if (n = 1) return 1; return factorial (n-1) n; What is a reasonable definition of the corresponding recurrence relation T(n)?
Step by Step Solution
3.46 Rating (153 Votes )
There are 3 Steps involved in it
1 Tn This represents the time complexity function denoting the numbe... View full answer
Get step-by-step solutions from verified subject matter experts
