Quicksort is a popular and common sorting algorithm that known to be really efficient. It createn 1959, and published in 1961 by Tony Hoare (He's k...
For further actions, you may consider blocking this person and/or reporting abuse
Despite the name, the quick sort algorithm has a worst-case complexity of O(n²). You might or might not want to try merge sort instead, depending on the size (and sorting state) of your list.
Or you could select a random element to be the pivot, that way you reduce a lot the chances of waving the worst case
Add it!
Thanks for reminding me! I just forgot to add it.
quicksort in Ruby. Short and clear.
I just tried to make it more readable for beginners. I can do oneliner in Python and OCaml too.
It's still readable, IMO.
So?