2
I need to know how to compute the complexity of this algorithm using the recurrence equation.
public int qdr(int x, int n) {
if(n == 0)
return 1;
else
return x * qdr(x, n-1);
}
It is a recursive algorithm that reads two numbers x and n and returns the result of x n
Homework lol
– Jorge B.
@Jorgeb. is College’s exercise list, is that I have proof today and need to understand how to calculate the complexity of recursive algorithms using the kk recurrence equation
– William Pereira
http://www.google.pt/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0CEQFjA&url=http%3A%2F%2Fwww.lume.ufrgs.br%2Fbitstream%2Fhandle%2F10183%2F2133%2F000269187.pdf%3Fsequence%3D1&ei=8M0NVNe4NI7baPD3gKAO&usg=Afqspyxxickystldyb55eudvnjzw&sig2=9tootoonxJemYZqtZfmC-fmC-Nq&bvm=bv.74649129,d.d2s
– Jorge B.