使用常数个空间对链表进行排序 Sort List

为什么80%的码农都做不了架构师?>>>    问题: Sort a linked list in O(n log n) time using constant space complexity. 解决: ① 本题要求使用一种时间复杂度为O(n log n),空间复杂度为常量。可以根据如下表格进行考虑: 本题采用归并排序。 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
相关文章
相关标签/搜索