I can't able to find the theta for some type of code like.
for(i=1;i<=n;i++){
for(j=i;j>=1;j=j/3){
....
}
}
How to find the theta for the above code.
It will be really helpful if some one help me how to find it in general case like.
for(i=1;i<=n;i++){
for(j=i;j>=1;j=j/K){
....
}
}
Ps: I know it for k=2 which is n*logn
Thanks in Advance