二叉树的遍历
小k安达
不乱于心,不困于情,不畏将来,不念过往,如此,安好!
展开
-
hdu-1710-Binary Tree Traversals
http://acm.hdu.edu.cn/showproblem.php?pid=1710给出输的先序和中序求后序遍历。#include<iostream> #include<cstdio> #include<stack> #define N 1010 using namespace std; int a[N],b[N];//分别存先序和中序 int n; ...原创 2018-03-29 10:05:17 · 247 阅读 · 0 评论 -
L2-006. 树的遍历
https://www.patest.cn/contests/gplt/L2-006给出后序遍历和中序遍历求 层次遍历#include<iostream> #include<cstdio> #include<stack> #include<queue> #include<vector> #define N 50 using namespa...原创 2018-03-29 15:41:57 · 242 阅读 · 0 评论