Define a recurrence F(n) for the code:
int a(int i, int j){
if( j <= 1)
return i+20;
else
return j + a(i+10, j-3);
}
This recurrence I've come up with is F(n) = 2 if j <= 1 and F(n) = 2 + F(i+10, j-3). Now I need to solve this recurrence and represent it in big O notation which I'm unsure how to do. The main thing throwing me off is that there are two variables in the function call.
Get Answers For Free
Most questions answered within 1 hours.