Adding a log in asymptotic analysis
问题 Have a problem I'm trying to work through and would very much appreciate some assistance! What's the time complexity of... for (int j = 1 to n) { k = j; while (k < n) { sum += a[k] * b[k]; k += log n; } } The outer for loop runs n times. I'm not sure how to deal with k+= log n in the inner loop. My thought is that it's O(n^2). Adding log(n) to k isn't quite getting an additional n loops, but I think it is less than O(n*log n) would be. Obviously, that's just a guess, and any help in figuring