public ListNode reverseBetween(ListNode head, int m, int n) {
		if (head == null || head.next == null || m >= n) {
			return head;
		}
		ListNode dummy = new ListNode(0);
		dummy.next = head;
		int curPos = 0;
		ListNode pre = dummy;
		while (curPos < m - 1 && pre != null) { // find m-1
			pre = pre.next;
			curPos++;
		}
		ListNode cur = pre.next;
		ListNode post = cur.next;
		curPos++;// now is m
		ListNode next;
		while (curPos < n && post != null) {
			next = post.next;
			post.next = cur;
			cur = post;
			post = next;
			curPos++;
		}
		next = pre.next;
		pre.next = cur;
		next.next = post;

		return dummy.next;
	}