#include <stdio.h>
typedef struct BiTNode {
int data;
struct BiTNode *lchild, *rchlid;
}BiTNode,*BiTree;
bool ChangLR(BiTree T)
{
if (T->lchild == NULL && T->rchlid == NULL)
{
return false;
}
else //交换当前左右子树
{
BiTree temp;
temp = T->lchild;
T->lchild = T->rchlid;
T->rchlid = temp;
}
ChangLR(T->lchild);
ChangLR(T->rchlid);
}
转载于:https://www.cnblogs.com/linkcode/p/8150839.html