resolve quicksort with double-ended partition