思路看起来很好理解的 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; } // 从第一个到第m个次序都正常 for (int i = 1; i <m ; i++) { pre=cur;...