设置虚拟头结点,虚拟头的next为headpre跳left-1下来到操作节点前cur指向pre.next即操作节点然后开始逆转循环~~~ public class Solution { public ListNode reverseBetween (ListNode head, int left, int right) { ListNode dummy = new ListNode(0); dummy.next = head; ListNode pre = dummy; for (int i = 1; i < l...