思路看起来很好理解的 public ListNode reverseBetween (ListNode head, int m, int n) { // 写虚拟头节点是为了找前驱,防止从第一个开始他没有前驱。 ListNode dummy=new ListNode(Integer.MIN_VALUE); dummy.next=head; ListNode cur=head; ListNode pre=dummy; if (head==null){ return null...