📄 emp5_22.cpp
字号:
// emp5_22
#include "btrechar.h"
boolean same(bitre t1,bitre t2)
{
boolean samet;
if ((t1==NULL) && (t2==NULL)) samet=true;
else
if ((t1==NULL) || (t2==NULL)){
samet=false;
if (t1!=NULL) visite_bnode(t1,1);
else visite_bnode(t2,2);
printf("\007");
Dispstrinwnd(20,2," Here is not same");
getch();
}else{
visite_bnode(t1,1);
visite_bnode(t2,2);
if (same(t1->lchild,t2->lchild) && same(t1->rchild,t2->rchild)) samet=true;
else samet=false;
}
return samet;
}
void main()
{
bitre t1,t2;
set_vbnode_mode();
get_bitre(t1);
get_bitre(t2);
disp_bitre("bitre1",t1); //move t1 to some position
if (same(t1,t2)) printf("\n\nTrue !");
else printf("\n\nFalse !");
getch();
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -