We now use the middle element as the pivot and do three way partitioning to improve sorting with equivalent elements