Java | Leetcode Java题解之第148题排序链表
题目: 题解: class Solution {public ListNode sortList(ListNode head) {if (head null) {return head;}int length 0;ListNode node head;while (node ! null) {length;node node.next;}ListNode dummyHead new ListNode(0, head);for (int subL…
2025-02-22