摘要: Sort a linked list in O(n log n) time using constant space complexity. (Medium) 分析: 因为题目要求复杂度为O(nlogn),故可以考虑归并排序的思想。 归并排序的一般步骤为: 1)将待排序数组(链表)取中点并一分为二; 阅读全文
posted @ 2016-12-20 21:16 wangxiaobao1114 阅读(273) 评论(0) 推荐(0) 编辑