![](https://img-blog.csdnimg.cn/20201014180756923.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
遍历二叉
wangfy_
这个作者很懒,什么都没留下…
展开
-
PATA 170304 D
//Suppose that all the keys in a binary tree are distinct positive integers. //A unique binary tree can be determined by a given pair of postorder and inorder traversal sequences. //And it is a simp...原创 2018-03-29 20:15:48 · 119 阅读 · 0 评论 -
PATA 1102
Invert(反) a Binary Tree (25) The following is from Max Howell @twitter: Google: 90% of our engineers use the software you wrote (Homebrew), but you can't invert a binary tree on a whiteboard so fuck...原创 2018-03-29 20:09:27 · 142 阅读 · 0 评论 -
题目中,树节点的表示方式有三
struct node { //动态(即指针)表示二叉树的树节点。重建二叉树问题为代表! node *l; node *r; int data; }; struct node { //静态表示二叉树的树节点 int l; int r; int data; } Node[MAXN]; struct node { //静态表示树的树节点 ve...原创 2018-04-24 14:51:19 · 557 阅读 · 0 评论 -
树分别在"静态(即数组)实现"和"指针实现"方式下的基操
// 树分别在"静态(即数组)实现"和"指针实现"方式下的 --------------------------------------------------------- // 基操(定义节点/建树/查改/插/遍历/重建): // 二叉树的指针实现方式: // 树节点的定义 struct node { int data; node* l; node* r; }; node* root ...原创 2018-04-21 20:21:44 · 213 阅读 · 0 评论