void Creat(BTNode *&T)
{
char ch;
cin >> ch;
if ((ch - '#') == 0)
T = NULL;
else
{
T = (BTNode *)malloc(sizeof(BTNode));
T->data = ch;
Creat(T->lchild);
Creat(T->rchild);
}
}
递归创建先序序列二叉树
最新推荐文章于 2023-11-18 21:47:29 发布