Use the Master Theorem to determine the complexity of the following 7. int recursiveFun2(int n) { if (n <= 0) return 1; else return 1 + recursiveFun2(n-5);

icon
Related questions
Question
Use the Master Theorem to determine the complexity of the following
7. int recursiveFun2(int n)
{
}
if (n <= 0)
return 1;
else
return 1 + recursiveFun2(n-5);
Transcribed Image Text:Use the Master Theorem to determine the complexity of the following 7. int recursiveFun2(int n) { } if (n <= 0) return 1; else return 1 + recursiveFun2(n-5);
Expert Solution
Step 1: Step 1

Use the Master Theorem to determine the complexity of the following 

1int recursiveFun2(int n)
2
3{
4
5if (n <= 0)
6
7return 1;
8
9else 
10return 1 + recursiveFun2(n-5);
11
12}
steps

Step by step

Solved in 3 steps

Blurred answer