public ListNode reverseBetween(ListNode head, int m, int n) {
		ListNode origEnd = null, begin, cur = head, pre = null, next;
		int count = 1;
		while(cur != null && count < m) {
			origEnd = cur;
			cur = cur.next;
			count ++; // forgot :(
		}
		begin = cur;
		
		while(cur != null && count <= n) {
			next = cur.next;
			cur.next = pre;
			pre = cur;
			cur = next;
			count++; // forgot :(
		}
		
		begin.next = cur;
		if(origEnd == null) return pre;
		origEnd.next = pre;
		return head;
	}