implement quick sort with Lomuto partitioning