#include<stdio.h>
#include<stdlib.h>
typedef char TElemType;
/*定义结点*/
typedef struct BTnode {
TElemType data;
struct BTnode *lchild;
struct BTnode *rchild;
}BTNode, *BiTree;
/*创建二叉树*/
void CreatBinaryTree(BiTree *node) {
char c;
scanf("%c", &c);
if (c == '#') //当输入为#符号,代表空指针域
*node = NULL;
else {
*node = (
二叉树的创建与遍历(递归法)
最新推荐文章于 2023-04-10 17:34:58 发布