392 views
1 votes
1 votes
What will be the time complexity of the following algorithm ?

A(n){

if(n<=1)

    return 1;

for(i=1;i<n;i++){

   for(j=0;j<3;j++){

     A(n-1)

   }

 }

}

Please log in or register to answer this question.

Related questions

5 votes
5 votes
0 answers
1
Mk Utkarsh asked Jan 9, 2018
423 views
T(n) $\leq$ T($\frac{n}{5}$) + T($\frac{7n}{10}$) + 15nT(n) $\leq$ 5 when n $<$ 6
5 votes
5 votes
2 answers
3
shaurya vardhan asked Nov 2, 2017
1,668 views
Consider the following functionVoid func(int n){Int k=n;Int i=0;for(;i<n;i++){while(k>1){k>>=1;}}What is the worst case time complexity of the function?
4 votes
4 votes
1 answer
4