Complete the QuickSort