solve some sort algorithm