first step of the algorithm to manage correctly K-sort case