sort list with NlogN