二叉树层次遍历
摘要:
//二叉树层次遍历算法#include <stdio.h>#include <malloc.h>#define MaxSize 1000typedef char ElemType; typedef struct node { ElemType data; struct node *lchild; struct node *rchild;} BTNode;//创建二叉树void CreateBTNode(BTNode *&b,char *str){ BTNode *St[MaxSize],*p=NULL; int top=-1,k,j=0; char ch; b= 阅读全文
posted @ 2011-07-28 11:40 原来... 阅读(837) 评论(0) 推荐(0) 编辑