@Override
	public void deleteMax() throws EmptyCollectionException,
			KeyNotFoundException {
		if (treeIsEmpty())
			throw new EmptyCollectionException();

		Node x = root;

		while (x.right != null)
			x = x.right;

		delete(x.key);
	}