while True:
   while the_array[greater_than_pivot_index] < pivot and
       greater_than_pivot_index < last_index:
       greater_than_pivot_index += 1
while thed_array[less_than_pivot_index] > pivot and
       ess_than_pivot_index >= first_index:
       less_than_pivot_index -= 1