Find an exact closed-form formula for M(n), the worst-case number of *'s performed by the algorithm below on input n
Extracted text: int p1(int n) { if (n 0) return 2022; == int ans = 1; for (int i = 0; i <= 2*n;="" ++i)="" *="" i="" *="" i;="" don't="" forget="" to="" count="" 2*n="" ans="" ans="" return="" ans="" p1(n-1);="">=>
Already registered? Login
Not Account? Sign up
Enter your email address to reset your password
Back to Login? Click here