08 2019 档案

摘要://判定一棵二叉树是否为完全二叉树 bool Is(BiTree b) { InitQueue(Q); BiTree p; if(b==NULL) //空树为满二叉树 return true; EnQueue(Q,b);//将根节点入队 while(!IsEmpty(Q)) //如果队列不为空 { DeQueue(Q... 阅读全文
posted @ 2019-08-13 20:08 小孢子 阅读(513) 评论(0) 推荐(0) 编辑
摘要:#include typedef struct BTNode { char data; struct BTNode * lchild; //p是指针L是左,child是孩子 struct BTNode * rchild; }BTNode,*BiTree; struct BTNode * CreateBTree(); void PreTraverseBTree(str... 阅读全文
posted @ 2019-08-09 19:45 小孢子 阅读(3511) 评论(0) 推荐(0) 编辑
摘要:#include #include #include #include struct BiTNode { int data; struct TreeNode *lchild,*rchild; }BiTNode, *BiTree; //输出二叉树的所有结点个数 int Put(BiTree b) { if(b==NULL) ... 阅读全文
posted @ 2019-08-09 18:33 小孢子 阅读(1519) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示