![](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): 3720 Problem Descri原创 2017-07-29 14:26:42 · 777 阅读 · 0 评论 -
Tree Recovery 已知先序和中序求后序
Tree Recovery Time Limit: 1000MS Memory Limit: 65536K Total Submissions: 15193 Accepted: 9371 Description Little Valentine liked playing with binary trees very much.原创 2017-07-29 14:53:03 · 286 阅读 · 0 评论 -
//先序a 和中序b 求后序 //已知后序a 中序b 求先序
#include #include using 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 · 195 阅读 · 0 评论