last element as pivot quicksort algorithm