multicore 2 pass partitioning with put back