![](https://img-blog.csdnimg.cn/20201014180756780.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
二叉树
じ☆夏妮国婷☆じ
人一我百!人十我万!永不放弃~~~怀着自信的心,去追逐梦想。
有事联系qq_1272991072,备注好CSDN和问题。
展开
-
Binary Tree Traversals 已知先序 中序 求后序
Binary Tree Traversals纯属个人理解Time Limit: 1000/1000 MS (Java/Others) Memory Limit: 32768/32768 K (Java/Others)Total Submission(s): 8243 Accepted Submission(s): 3720Problem Descri原创 2017-07-29 14:26:42 · 776 阅读 · 0 评论 -
Tree Recovery 已知先序和中序求后序
Tree RecoveryTime Limit: 1000MSMemory Limit: 65536KTotal Submissions: 15193Accepted: 9371DescriptionLittle Valentine liked playing with binary trees very much.原创 2017-07-29 14:53:03 · 285 阅读 · 0 评论 -
//先序a 和中序b 求后序 //已知后序a 中序b 求先序
#include#includeusing namespace std;char a[30],b[30];//先序a 和中序b 求后序 void dg(int r1,int l1,int r2,int l2){int i;if(r1>l1) return;for(i=r2;w[i]!=a[r1];i++);dg(r1+1,l1-l2+i,r2,i-1);转载 2017-07-29 14:42:56 · 194 阅读 · 0 评论