I'm currently learning about the big O notation. In the material, O(NlogN)
was described as Doubled plus an amount proportional to N
. But I thought that would be O(N + logN)
and not O(NlogN)
(I thought O(NlogN)
is Double times logN
).
Is there something logically wrong with my understanding?
Replace N
with 2N
as stated:
2N log 2N = 2N * (log N + log 2)
(using logarithm rules)
Doubled original term 2 * (N log N)
Additional term (2 log 2) * N
i.e. "proportional to N
".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With