import java.util.*; public class Solution { public ListNode reverseBetween (ListNode head, int m, int n) { ListNode dummyNode = new ListNode(-1); dummyNode.next = head; ListNode pre = dummyNode; //1.走m-1步到left的前一个节点 for(int i=0;i<m-1;i++){ pre = pre.next; } //2.走n-m+1步到right节点 ListNode rigthNode ...