partition function works properly for pivotting left element
QuickSort and the partition function work properly for the three cases.