Here's the code I've implemented in a nutshell.
for(i= 1;i<=n;i++){
for(j = 1;j<=i;j++){
for(k = 1;k<=j;k++){
k = k*2;
}
}
}
for(int i = 1; i <= n; i = 2*i){
for(int j = 1; j <= i; j = 2*j){
for(int k = 0; k <= j; k++){
// Some elementary operation here.
}
}
}
I have now analyzed that the time complexity of the first code fragment is O(n*n*log(n)), but I can't figure out which one comes after it。Although this question has been answered here, But I didn't figure out why this.