return result;
}
//将子树连接到指定树的第num个结点上,前提是这个结点必须是空结点,并且度数相同,否则抛出异常
public virtual void AttachSubtree(uint num,NaryTree _naryTree)
{
if(this.IsEmpty())
throw new Exception("My:it can't be a empty tree!");
if(!(this[num-1].IsEmpty()) | this.degree!=_naryTree.degree )
throw new Exception("My:this[i-1] must be empty and they should have the same degree!");
this[num-1]=_naryTree;
}
文章整理:西部数码--专业提供域名注册、虚拟主机服务
http://www.west263.com
以上信息与文章正文是不可分割的一部分,如果您要转载本文章,请保留以上信息,谢谢!



