can someone please help me figure out the runtime complexity of:
public void f(int m,int n){
int i = m;
while(i > 100){
i = i / 3;
}
for(int k = i; k >= 0; k--){
for(int j = 1; j < n; j *= 2){
System.out.println(k + "/t" + j);
}
System.out.println();
}
}
the while part I just really dont know how to approach... the nested loop in my opinion is o(in) because the outer loop runs i times and the inner loop runs n/2 times, but i got the feeling im wrong. if you could tell me how you got t the answer and how to approach questions like this thanks