BiTree Create(elemtype x,BiTree lbt,BiTree rbt) |
{ /*生成一棵以x 为根结点的数据域值以lbt 和rbt 为左右子树的二叉树*/ |
BiTree p; |
if ( ( p= ( BiTNode * ) malloc ( sizeof ( BiTNode ) ) ) ==NULL ) return NULL; |
p->data=x; |
p->lchild=lbt; |
p->rchild=rbt; |
return p; |
} |