Quick Sort This is used in research code when built-in qsort does not satisfy the demands.

K-th element Qsort can be used to find the Kth smallest element a[k]:

Use partition to sort 0, 0, 0, 1, 1, 2, 2, 2…

  Merge Sort Linked List Version Here is the merge sort…