logoalt Hacker News

amlutoyesterday at 6:05 PM2 repliesview on HN

> O(l n)

If you don’t have large numbers of repeats of each element, then l needs to scale like O(log n), so O(l * n) is at least O(n log n).

Fundamentally, what’s going on here is that switching between computation models can easily add and remove log factors.


Replies

SkiFire13yesterday at 6:35 PM

I think you're making some assumptions on n that I'm not making. I'm considering it to be the number of elements to sort, not the size of the input.

show 1 reply
robotpepiyesterday at 6:09 PM

> so O(l * n) is at least O(n).

I guess you mean "at least O(n*log(n))".

show 1 reply