Partition
We are going to develop a sorting algorithm called quicksort. An important piece of it is an algorithm called partition, which starts with an array segment that looks like this (x is the initial value in b[h]):
and permutes its elements so that it looks like this:
In rearranging the array in this fashion, the order of the final values of b[h+1..j-1] and b[j+1..k] doesn�t matter