I was working on implementing a quicksort yesterday, and then I ran it, expecting a faster runtime than the Mergesort (which I had also implemented). I ran the two, and while th
(1) There is an qsort algo, used by C qsort(), which doesn't require extra memory. This
was most probably invented by Hoare. This makes qsort() fast in C.
(2) Randomizing the data before running qsort will almost always speed it up.
(3) selecting the median data for pivot may make it faster,