the array to be sorted
a 2-parameter
function returning a number n, telling if the 1st parameter is
less-than (n < 0), equal (n == 0) or greater than the 2nd (n > 0)
a 1-parameter function returning an element of the array
a new array with the same elements as anArray but sorted
Sorts the array
anArrayaccording to the comparatoraCmpFunusing a quick sort (https://en.wikipedia.org/wiki/Quicksort. The parameteraPickFuntells how to choose the pivot for splitting the array.The algorithm itself is described in the Cormen, chapter 7.1.