I am confused in calculating the time complexity for a recursive function inside a loop.
Function (int n){
if(n<=1) return;
for(int i=1;i<=3;i++)
Function(n/3);
}
in the text book answer written for this is theta(n). Please explain how is it so?