public Stack<Integer> sortStack(Stack<Integer> origStack) {
		Stack<Integer> resultStack = new Stack<Integer>();
		int popCountOrig = 0;
		int pushCountOrig = 0;
		int n = origStack.size();

		while (!origStack.empty()) {
			int tmp = origStack.pop();
			popCountOrig++;

			while (!resultStack.empty() && resultStack.peek() > tmp) {
				origStack.push(resultStack.pop());
				pushCountOrig++;
			}
			resultStack.push(new Integer(tmp));
		}

		// System.out.println("OrigStack: pop "+popCountOrig+"/push "+pushCountOrig);
		// System.out.println("NewStack: pop "+popCountNew+"/push "+pushCountNew);
		System.out.println("Complexity from " + n + " to " + n * n);
		System.out.println("total count " + (popCountOrig + pushCountOrig));

		return resultStack;
	}