leetcode, sort list with O(nlogn) and constant space