#include <stdio.h>
#include <stdlib.h> 【程序编程相关:经典数据结构题目】 【推荐阅读:webmenu编程精彩历程(二)菜单xm】#include <math.h> 【扩展信息:螺旋算法】 #define elementtype int #define maxsize 511 //the number of the node is 2^levels-1 //and the max level is 9//an array to store each value of the node in the tree by its index
int values[maxsize];//node structure constructor
typedef struct bt { elementtype data; struct bt *lchild, *rchild; } binarytreenode,*btroot;//function declear
elementtype inorder(btroot root); elementtype preorder(btroot root); elementtype postorder(btroot root); void listtree(int l); void addspace(int i);//the main function to excute
main() { int i,l,n;btroot r=malloc(sizeof(binarytreenode));
printf("===================================================================\n"); printf("binarytree list & 3-order program by songnan @ 2004\n"); printf("===================================================================\n"); ... 下一页