emp5_06.cpp
来自「该包是数据结构的实验软件,来源于合肥工业大学人工智能与数据挖掘实验室,用来实现数」· C++ 代码 · 共 24 行
CPP
24 行
// emp5_06 btre6;
#include "btrechar.h"
boolean same(bitre t1,bitre t2)
{
if ((t1==NULL) && (t2==NULL)) return true;
else
if ((t1==NULL) || (t2==NULL)) return false;
else
if (same(t1->lchild,t2->lchild)&& same(t1->rchild,t2->rchild)) return true;
else return false;
}
void main()
{
bitre t1,t2; Into_graph();
create_ex_bitre(t1);
display_bitre("t1",t1);
create_gr_bitre(t2);
display_bitre("t2",t2);
if (same(t1,t2)) printf(" t1,t2 is same!\n");
else printf(" t1,t2 is not same!\n");
getch();
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?