二叉树程序.docVIP

  • 18
  • 0
  • 约5.81千字
  • 约 8页
  • 2016-11-26 发布于重庆
  • 举报
二叉树程序

#include stdlib.h #include iostream using namespace std; #define TRUE 1 #define FALSE 0 #define OK 1 #define ERROR 0 #define INFEASIBLE -1 #define OVERFLOW -2 #define INITSIZE 100 #define INCREMENT 10 #define NULL 0 typedef int Status ; typedef char TElemType; //二叉树定义 typedef struct BiTNode{ TElemType data; struct BiTNode *lchild,*rchild; }BiTNode,*BiTree; //栈定义及操作 typedef BiTree SElemType; typedef struct { SElemType elem[INITSIZE]; int top,base; }Stack; void initstack(Stack S){ S.top =0; S.base =0; } void push(Stack S,

文档评论(0)

1亿VIP精品文档

相关文档