News for hackers. Stuff that matters.
Re:Blitsort: An ultra-fast in-place stable hybrid merge/quic... by kjeetgill on Friday December 02, 2022 @07:41PM (#33838974)
People forget! The O(nlogn) limit for the best worst case is for comparison sorts. I don't know if you consider it a "special case", but for more cases than not you can do guaranteed linear time to the number of elements: Radix and Bucket Sort. This is O(n) for things like ints because the number of bits are constant but for strings the length plays a factor: O(k*n).

You could also consider things like sleep sort or spaghetti sort: googling them I'll leave to the reader. Oh, and sorting networks are a good read too.

There are no comments on this comment yet.