The way you describe the question both k
and n
are input parameters. If that is the case then the answer to your question is
'No, O(n*k *log(k))
is not the same as O(n*log(k))
'.
It is not that hard to see that the first one grows faster than the second one, but it is even more obvious if you fix the value of n.
Consider n begin a constant say 1
. Than it is more obvious that O(k*log(k))
is not the same as O(log(k))
.