当前位置:网站首页>二叉树,遍历
二叉树,遍历
2022-07-16 04:30:00 【群野】
分先根,中根,后根遍历。
已知7个节点的二叉树的先根遍历是1 2 4 5 6 3 7(数字为节点的编号,以下同),中根遍历是4 2 6 5 1 7 3,则该二叉树的后根遍历是()。
已知条件可以知道,
- 最高的节点应该是1。左节点的数据是:4 2 6 5,右节点:7 3
- 又由先根遍历,二层节点:2 3
- 最后考虑三层的左右节点:
2的左节点4,右节点5,5的右节点6
3的左节点7。
所以后根遍历为:4 6 5 2 7 3 1
边栏推荐
- canvas 性能优化的几种方式?
- 第五届GXCPC广西大学生程序设计竞赛 部分题解(无CDK)
- micro、M3O微服务系列(一)
- Part of the problem solution of the 5th gxcpc Guangxi university student programming competition (without CDK)
- Example analysis of go language selector
- 7.15 Résumé du concours de simulation
- Sword finger offer 10- ii Frog jumping on steps
- dpdk flow filter总结(flow director/ rte_flow)
- 盒子模型、文档流、定位、布局和响应式设计
- idea 将dev分支代码合并到master类推
猜你喜欢

高数 | 积分中值定理的开闭区间、积分第一中值定理及其推广

ping 命令还能这么玩?

The digital transformation forum for small and medium-sized enterprises in Shandong Province was successfully held, and Jiuzhou cloud empowers small and medium-sized enterprises to upgrade their digit

Introduction of oscilloscope bandwidth

Sword finger offer 27 Image of binary tree

OpenCV:05滤波器

晴空一“鹤”排“云”上:以数为翅的中国飞鹤

Test / develop programmers' humorous "self mockery"? Impression genre
![ORA-600:[qertbGetPartitionNumber:qesma2],[],[],[]](/img/08/5c9a27c0b488f76e3815ce76047082.png)
ORA-600:[qertbGetPartitionNumber:qesma2],[],[],[]

Baccalais PLC change axis task scanning time and cycle position issue
随机推荐
leetcode 2. Add two numbers
micro、M3O微服务系列(二)
Idea merges dev branch code into master and so on
What is the master-slave replication principle of MySQL
leetcode445. Add two numbers II
单细胞文献学习(part4)--SCANPY: large-scale single-cell gene expression data analysis
Sword finger offer 27 Image of binary tree
Abbyy finereader 15 standard OCR character recognition and PDF editing software tool
应用打包及多端兼容总结
Sword finger offer 10- ii Frog jumping on steps
[Luogu p2151] HH go for a walk (DP) (matrix multiplication)
高数 | 积分中值定理的开闭区间、积分第一中值定理及其推广
【目标跟踪】基于背景消减的图像帧间差分法目标检测及matlab仿真
Installing the g2opy frame
Basic knowledge of triode (Part 2) ②
自动补全(春季每日一题 58)
How does golang calculate constellations and zodiac signs based on birthdays
Solve the error of getting body content in filter, getreader() has already been called for this request
Single cell literature learning (Part4) -- scanpy: large scale single cell gene expression data analysis
AB PLC学习笔记