二叉树遍历完整程序

发布时间:2023-04-07 09:47:10   来源:文档文库   
字号:
//BitTree.cpp:Definestheentrypointfortheconsoleapplication.//#include"stdafx.h"#include"stdio.h"#include"stdlib.h"typedefstructBitNode{chardata;BitNode*lchild,*rchild;}BitNode,*BitTree,ElemType;typedefstructnode{ElemTypestack;structnode*next;}linkstack;//树的结构体定义//栈的结构体定义-1-
typedefstructQNode{BitNodedata;structQNode*next;}QNode,*QueuePtr;//队列节点类型typedefstruct{QueuePtrfront;QueuePtrrear;}LinkQueue;//队列的头尾指针voidInitQueue(LinkQueue*Q//创建队列{Q->front=Q->rear=(QueuePtrmalloc(sizeof(QNode;-2-

本文来源:https://www.2haoxitong.net/k/doc/a89a92c18bd63186bcebbc61.html

《二叉树遍历完整程序.doc》
将本文的Word文档下载到电脑,方便收藏和打印
推荐度:
点击下载文档

文档为doc格式