其实就是题目翻转链表的k个节点连续执行多次,每次都更换头结点。 import java.util.*; public class Solution { public ListNode reverseKGroup (ListNode head, int k) { if (head == null || head.next == null || k == 1) return head; int len = 0; ListNode temp = head; while (temp != null) { ...