private STNode<Key, Value> deleteMax(STNode<Key, Value> x)
	{
		if (x == null)
			return null;

		// No right child. This is the maximum node. Orphan it by returning its
		// left subtree
		if (x.right == null)
			return x.left;

		// the maximum lies in the right subtree
		x.right = deleteMin(x.right);

		// Update size and height on the way up(from the recursive calls)
		x.N = size(x);
		x.h = height(x);

		return balance(x);
	}