for(int i = n; i > 0; i/=3){
for(int j = 0; j < i; j++){
System.out.println("Hello");
}
}
Is it O(n) or O(nlog n)?
The outer loop will run log3 n times - as the iterator is getting factored by a constant of 3.
Thus, the outer loop will be called log3 n times
belongs to O(nlog n)?