Partial parallelization of IsNextK. Parallelized QSort.