logoalt Hacker News

ErroneousBoshyesterday at 11:28 PM1 replyview on HN

If you need a stable sort, can't be bothered finding a massive oversize library to link to, and only need to sort a relatively small number of objects on a system that's resource-constrained, I'm guessing?


Replies

thomasmgtoday at 8:41 AM

I'm surprised that the simple, ~80 lines version of stable-in-place merge sort (see link in the above comments) is not more widely known. It is O(n log n log n) and not all that hard to implement.