摘要: 1 #include 2 #include 3 typedef struct node 4 { 5 int data; 6 struct node *l,*r; 7 8 }tree; 9 tree* Creattree(void)//层次建立二叉树 10 { 11 int data,front=1,rear=0; 12 tree*... 阅读全文
posted @ 2019-05-10 16:44 AQhhhhh 阅读(3247) 评论(0) 推荐(0) 编辑
摘要: 二叉树的顺序存储是指用一组地址连续的存储单元依次自上而下、自左向右存储完全二叉树上的结点元素 1 #include 2 #include 3 typedef struct btree 4 { 5 int data; 6 struct btree *right,*left; 7 8 }tree; 9 int s[1001],n; 10 void build... 阅读全文
posted @ 2019-05-10 16:03 AQhhhhh 阅读(2093) 评论(0) 推荐(0) 编辑