public ListNode reverseBetween(ListNode head, int m, int n) {
		if(head == null || head.next == null) return head;
		
		ListNode preNode = new ListNode(0);
		preNode.next = head;
		ListNode ahead = head;
		ListNode current = head;
		
		for(int i=0; i<n-m; i++)
			ahead = ahead.next;
		
		for(int i=1; i<m; i++){
			preNode = current;
			ahead = ahead.next;
			current = current.next;
		}
		
		boolean fromHead = false;
		if(current == head) fromHead = true;
		while(ahead != current){
			ListNode tmp = ahead.next;
			ahead.next = current;
			preNode.next = current.next;
			current.next = tmp;
			current = preNode.next;
		}
		if(fromHead) return ahead;
		
		return head;
		
	}