摘要: 迭代 class Solution { public ListNode reverseKGroup(ListNode head, int k) { ListNode dummyHead = new ListNode(0, head); ListNode prev = dummyHead; ListN 阅读全文
posted @ 2021-12-17 14:44 振袖秋枫问红叶 阅读(33) 评论(0) 推荐(0)
摘要: 递归 class Solution { public ListNode insertionSortList(ListNode head) { /** * 终止条件 */ if (head == null || head.next == null){ return head; } ListNode n 阅读全文
posted @ 2021-12-17 10:21 振袖秋枫问红叶 阅读(32) 评论(0) 推荐(0)