Modified the partitioning logic for quick sort.