Find an exact closed-form formula for M(n), the worst-case of *'s performed by the algorithm below on input nn, where n is a power of 3:
*and no the other solution avaible is wrong
Extracted text: int p2 (int n) { if (n return 1*2*3; 1) == int ans 1; for (int i = 0; i <= 2*n;="" ++i)="" *="" i;="" return="" ans="" *="" p2(n/3)="" *="" p2(n/3);="" ans="ans">=>
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here