叶子结点连接概论.docVIP

  • 3
  • 0
  • 约4.32千字
  • 约 7页
  • 2017-07-09 发布于湖北
  • 举报
叶子结点连接: #include stdio.h #include malloc.h #include stdlib.h #define create(p) p=(struct BT_Node *)malloc(sizeof(struct BT_Node)) #define MAXSIZE 15 struct BT_Node { char data; struct BT_Node *leftson,*rightson; }; struct Queue { struct BT_Node *queue[MAXSIZE]; int head,rear; }; void initQueue(struct Queue *queue) { queue-head=-1; queue-rear=-1; } struct Stack { struct BT_Node *pStack[MAXSIZE]; int top,base; }; void initStack(struct Stack *p) { //int i; p-base=-1; p-top=-1; /*for(i=0;iMAXSIZE;i++) { p-sign[i]=-1; p-pStack[i]=NULL; }*/ } int stackEmpty(struct Sta

文档评论(0)

1亿VIP精品文档

相关文档