public ListNode reverseBetween(ListNode head, int m, int n) {
		if(head == null || m == n)
			return head;
		Stack<Integer> stack = new Stack<Integer>();
		ListNode prev = null;
		ListNode p = head;
		int count = 0;
		while(true){
			count ++ ;
			if(count == m)
				prev = p;
			if(count  >= m && count <= n)
				stack.push(p.val);
			if(count >= n)
				break;
			p = p.next;
		}
		p = prev;
		while(!stack.isEmpty()){
			p.val = stack.pop();
			p = p.next;
		}
		return head;
	}