K个一组反转链表
K个一组翻转/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int va
K个一组翻转/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode() {} * ListNode(int va
思路1:通过递归到最后一个节点,然后依次修改原节点的next指针/** * Definition for singly-linked list. * public class ListNode { * int val; * ListNode next; * ListNode(