What would be the big o for the algo:
for (i=0; i < n*n; i++)
for(j=0; j<i*i; j++)
As per my understanding
1st loop will loop upto n2 times.
2nd loop will go around n2 times.
Am I right or is it a O(n6) representation?
Also is there a easy way to say when to use log. I have assumed that whenever the loop variable is multiplied the ln function is applied
e.g.: for (i=1; i<n*n i=i*2)
Big o for the loop as per my understanding is O(ln n2) (Am I right again?)