
Desicription
Sort a linked list in O(n log n) time using constant space complexity.
Example 1:
1 |
Input: 4->2->1->3 |
Example 2:
1 |
Input: -1->5->3->4->0 |
Solution
1 |
|

Sort a linked list in O(n log n) time using constant space complexity.
Example 1:
1 |
Input: 4->2->1->3 |
Example 2:
1 |
Input: -1->5->3->4->0 |
1 |
|
近期评论