Question: int recursive7(int a) { int b = 0; if (a
int recursive7(int a) { int b = 0; if (a <= 1) return 1; for (int c = 1; c <= a; c++) { b = b + 2*c; } return recursive7(a/2) * recursive7(a/2) + b; }
1. Write a recurrence relation(recursive and base) which describes the running time of this function.
2. Use the repeated substitution method to solve recurrence relation and get running time.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
