会员
周边
众包
新闻
博问
闪存
所有博客
当前博客
我的博客
我的园子
账号设置
简洁模式
...
退出登录
注册
登录
wdan2016
博客园
首页
新随笔
联系
订阅
管理
2016年10月22日
输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树。假设输入的前序遍历和中序遍历的结果中都不含重复的数字。例如输入前序遍历序列{1,2,4,7,3,5,6,8}和中序遍历序列{4,7,2,1,5,3,8,6},则重建二叉树并返回。
摘要: // test20.cpp : 定义控制台应用程序的入口点。 // include "stdafx.h" include include include include include using namespace std; struct TreeNode { int val; TreeNode
阅读全文
posted @ 2016-10-22 22:30 wdan2016
阅读(3862)
评论(1)
推荐(0)
编辑
公告