3 ms·
Basically pigeon hole or bucket sorting https://en.wikipedia.org/wiki/Pigeonhole_sort https://en.wikipedia.org/wiki/Pigeonhole_sort which, as another commenter
by nijave 5y ago
Basically pigeon hole or bucket sorting https://en.wikipedia.org/wiki/Pigeonhole_sort https://en.wikipedia.org/wiki/Pigeonhole_sort which, as another commenter mentioned, are types of non-comparison sorting so you can get near linear times
I think the mainstream sorting algorithms tend to cater towards "mainstream" ordering which tends to be somewhat sorted versus purely random. An example is https://en.wikipedia.org/wiki/Timsort https://en.wikipedia.org/wiki/Timsort