Y
Hacker News
new
|
ask
|
show
|
jobs
by
civility
2617 days ago
Also no mention of introsort (C++ std::sort), where it uses insertion sort for small arrays, detects if it's fallen too far towards O(n^2) of quicksort, and punts to heapsort when it needs to.
1 comments
hinkley
2617 days ago
You can pry my stable sort algorithms out of my cold, dead hands.
link
civility
2617 days ago
Heh, I think stable sorts are great. However, you don't always need one, and you do pay a little bit for it.
link
jfoutz
2617 days ago
Add the factors to the sort key? Every sort is stable if you have some vague ideas about what to sort on.
link
hinkley
2617 days ago
What?
link