主观

给出二叉链表定义如下。程序f33生成原二叉树的镜像树,即将二叉树中所有结点的左、右子树互换。请在空白处填写适当内容,完成其功能。

typedef char DataType;

typedef struct node{

        DataType data;                            //data是数据域

        struct node *lchild, *rchild;       //分别指向左右孩子

 } BinTNode;;

 typedef BinTNode"BinTree;

 BinTree f33( BinTree T)

          {    Bin Tree NewT;

               if(____(1)_____  return NULL;

                  ____(2)_____=( BinTree)malloc( sizeof( BinTNode));

              NewT->data= T->data;

               NewT->lchild=____(3)_____;

               NewT->rchild=____(4)_____;

               return ____(5)_____;

}

参考答案
您可能感兴趣的试题
¥

订单号:

遇到问题请联系在线客服

订单号:

遇到问题请联系在线客服