> 文档中心 > 后续遍历模版

后续遍历模版

请看完后点个赞,谢谢

//求后续遍历模版 22-03-19#includeusing namespace std;string zx,qx;void hxbl(int zxs,int zxe,int qxs,int qxe){int rootloc=zx.find(qx[qxe]);if (rootloc>zxs)hxbl(zxs,rootloc-1,qxs,qxs+rootloc-1-zxs);//leftif (rootloc<zxe)hxbl(rootloc+1,zxe,qxs+rootloc-zxs,qxe-1);//rightcout<>zx>>qx;    hxbl(0,zx.length()-1,0,qx.length()-1);return 0;}

https://blog.csdn.net/zeekliu/article/details/124098799​​​​​​​ 

情感课堂