Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Quicksort ain't shit

Name: Anonymous 2016-08-15 17:16

The fact that it's a commonly taught sorting algorithm is just an accident of history and imperative languages' being popular. It's actually quite a lot more complex than merge sort or heap sort and it's much harder to analyze. (Proving that merge sort runs in O(n log n) is relatively easy; proving that quicksort runs in O(n log n) in expectation is quite hard.)

Name: Anonymous 2016-08-15 20:25

>>10
Wrong. Quicksort is O(n) when the vector is almost sorted, otherwise it's O(n^2). That's why nobody uses qsort() from libc.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List