3 ms·
We could argue quicksort could be rendered obsolete soon.
by KirinDave 9y ago
We could argue quicksort could be rendered obsolete soon.
- metaobject 9y agoObsolete or not, I'd hope it remains in the collection of sorting algorithms tht are presented to students in undergraduate algorithms course. It's instructive to compare and contrast the strengths and weaknesses of these various approaches.
- KirinDave 9y agoDo any courses include radix or discrimination sort yet? Mine sure didn't. I've never been a fan of quicksort as an algorithm. It's more like, "Let's fit this sort option to the weird hardware constraints we arrived at instead of asking for better hardware."
- jacquesm 9y agoI think quicksort is a fantastic illustration of the 'divide and conquer' principle and for that reason alone it deserves a spot in any kind of CS course. Besides that it is also a fairly good sorting algorithm with an interesting pathological case that is fortunately reasonably easy to test for. All in all, as a good first start when you need to sort stuff quicksort does just fine.
- KirinDave 9y agoI don't disagree that it has didactic value. I think in industry its time is probably going to decline.
- jdietrich 9y agoWe still teach all sorts of slow and inefficient sorting algorithms, because it helps to understand the core principles of sorting algorithms and computational complexity. I don't think I've ever actually used a bubble sort or a selection sort in anger, but the process of studying those algorithms taught me to reason more generally about algorithms, which is really the entire point. Computer science is a branch of mathematics; mathematics isn't really about knowing things, but about knowing how to work things out. I suspect we'll be teaching quicksort forever, because it's a really good example of a divide and conquer algorithm.
- KirinDave 9y agoI don't disagree! It has didactic value. But that's not really the premise I was responding too. Plus, I obviously enkoying being The Person In The Room talking about how the state of the art in sort puts it at linear time and right up against the edge of the information theoretical limits for bitwise comparisons.