public static <E extends Comparable<E>> void sortWithStack(Stack<E> stack) {
		if(stack.isEmpty()) {
			return;
		}
		
		Stack<E> auxStack = new Stack<E>();
		while(!stack.isEmpty()) {
			E item = stack.pop();
			
			while(!auxStack.isEmpty() && auxStack.peek().compareTo(item)>0) {
				E tmpItem = auxStack.pop();
				stack.push(tmpItem);
			}
			auxStack.push(item);
		}

		Queue<E> tmpQueue = new LinkedList<E>();
		while(!auxStack.isEmpty()) {
			tmpQueue.offer(auxStack.pop());
		}
		while(!tmpQueue.isEmpty()) {
			stack.push(tmpQueue.poll());
		}
	}