I have this code and I have to know the time complexity of it, I am a beginner in this subject and it confuses me a little bit.
void func(int n){
while(n > 0 && n % 3 ==0){
do_computation(n);
n = n/3;
}
}
the function do_computatation have a time complexity of 1 then the worst case of func would be O(log3n) is that right ?