摘要:
#include #include typedef struct btnode{ int data; struct btnode *lchild,*rchild;}btnode;int b[100];//在二叉树中插入元素btnode *insertnode(btnode *root,int node){ btnode *newnode; btnode *currentnode; btnode *parentnode; newnode=(btnode*)malloc(sizeof(btnode)); newnode->lchild=NULL; n... 阅读全文
posted @ 2013-10-14 20:42
一线添
阅读(357)
评论(0)
推荐(0)
摘要:
#include #include typedef struct btnode{ int data; struct btnode *lchild,*rchild;}btnode,*btree;//建立二叉树btree createtree(){ btree T; char p; p=getchar(); if (p=='#') T=NULL; else { T=(btree)malloc(sizeof(btnode)); T->data=p; T->lchild=createtree(); ... 阅读全文
posted @ 2013-10-14 18:26
一线添
阅读(297)
评论(0)
推荐(0)