public TreeNode getSecondMax() {
		TreeNode current = root, parent = null;
		if (current == null)
			return null;

		while (current.right != null) {
			parent = current;
			current = current.right;
		}

		if (current.left != null) {
			current = current.left;

			while (current.right != null) {
				current = current.right;
			}
		} else
			return parent;

		return current;
	}