chenxi16

导航

2020年4月1日 #

数据结构1 - 03-树3 Tree Traversals Again

摘要: 1 #include<stdio.h> 2 #define MAXN 31 3 int a[MAXN],n,flag[MAXN]; 4 void deal(); 5 int main(){ 6 scanf("%d",&n); 7 a[0] = n; 8 flag[0] = n; 9 deal(); 阅读全文

posted @ 2020-04-01 17:37 chenxi16 阅读(168) 评论(0) 推荐(0) 编辑

数据结构-1 03-树2 List Leaves

摘要: 1 #include<stdio.h> 2 #define MAXN 10 3 struct node{ 4 int left,right; 5 }; 6 struct node a[MAXN]; 7 int n,leavesnum,r; 8 void showleave(); 9 void rea 阅读全文

posted @ 2020-04-01 13:15 chenxi16 阅读(178) 评论(0) 推荐(0) 编辑

数据结构-1 03-树1 树的同构

摘要: 1 #include<stdio.h> 2 struct node{ 3 char data; 4 int left,right; 5 }; 6 struct node a[11],b[11]; 7 int Na,Nb,ra,rb,flag; 8 int read(struct node a[],i 阅读全文

posted @ 2020-04-01 12:28 chenxi16 阅读(180) 评论(0) 推荐(0) 编辑

数据结构 02-线性结构4 Pop Sequence

摘要: 刚开始拿到这道题的时候错误的做法: 1 //相邻之间的数小于等于M 2 //首先弹出来的数小于等于M 3 #include<stdio.h> 4 #include<math.h> 5 #define MAXN = 1000000; 6 int M,N,K; 7 int main(){ 8 int p 阅读全文

posted @ 2020-04-01 10:19 chenxi16 阅读(131) 评论(0) 推荐(0) 编辑