摘要: 重建二叉树// 题目:输入某二叉树的前序遍历和中序遍历的结果,请重建出该二叉树。 #include <iostream> #include <exception> //二叉树结构体 struct BinaryTreeNode{ int value;//根 BinaryTreeNode *pLeft; 阅读全文
posted @ 2021-06-11 08:11 crazybird123 阅读(34) 评论(0) 推荐(0) 编辑
摘要: #include <iostream> #include <vector> #include <stack> struct BinaryTreeNode{ int val; BinaryTreeNode* left; BinaryTreeNode* right; BinaryTreeNode(int 阅读全文
posted @ 2021-06-11 00:50 crazybird123 阅读(33) 评论(0) 推荐(0) 编辑