5 ms·
Schoolbook exchange quicksort isn't stable, but quicksort absolutely can be implemented stably, which I do in glidesort: https://www.youtube.com/watch?v=2y3IK1l
by orlp 4y ago
Schoolbook exchange quicksort isn't stable, but quicksort absolutely can be implemented stably, which I do in glidesort: https://www.youtube.com/watch?v=2y3IK1l6PI4 https://www.youtube.com/watch?v=2y3IK1l6PI4.
- janwas 4y agoFurther to that, many use cases of Quicksort have unique keys, so stable is the same as unstable. Example: ascending indices appended to the key, when sorting large records where we don't want to move around the entire record.