A simple implementation of quicksort.