Level sort (the second wave)