排序链表

LeetCode 经典 150 分治
难度: 中等

题目描述

对链表进行排序,要求时间复杂度为 O(n log n)。

解题思路

使用分治法,递归拆分链表为两部分,合并排序后的子链表。