当前位置:网站首页>Tree, forest and transformation of binary tree
Tree, forest and transformation of binary tree
2022-06-22 19:56:00 【Just one word】
1. Convert normal tree to binary tree

Add lines , Add a connection between all brother nodes .

Off line , For every node in the tree , Only the connection between it and the first child node , Delete the connection between it and other child nodes .

Level adjustment , Take the root node of the tree as the axis , Turn the whole tree clockwise for a certain angle , Make it structured

2. The forest is converted into a binary tree
Convert each tree into a binary tree .
The first binary tree doesn't move , Start with the second tree , Take the root node of the last binary tree as the right child of the root node of the previous binary tree , Connect with wires .
3. Binary trees transform into forests 、 Common tree
Judge whether a binary tree can be converted into a tree or a forest , The standard is simple , That is, just look at whether the root node of this binary tree has a right child , Some are forests , If there is no tree, it is an ordinary tree .



边栏推荐
- k8s部署mysql
- C #, introductory tutorial -- a little knowledge about function parameter ref and source program
- AB打包有的Shader没有触发IPreprocessShaders的回调
- Altium Designer中off grid pin解决方法
- 1.4----- PCB design? (circuit design) determination scheme
- 产品几何技术规范(GPS) 线性尺寸公差ISO代号体系
- Creator mode summary
- 区间检索SQL性能优化方法
- Initial experience of ABAQUS using RSG drawing plug-in
- 【深入理解TcaplusDB技术】集群管理操作
猜你喜欢

0.1-----用AD画PCB的流程

510000 prize pool invites you to join the war! The second Alibaba cloud ECS cloudbuild developer competition is coming

Creator mode summary

51万奖池邀你参战!第二届阿里云ECS CloudBuild开发者大赛来袭

About Random Forest
![[nfs failed to mount problem] mount nfs: access denied by server while mounting localhost:/data/dev/mysql](/img/15/cbb95ec823cdde5fb8f032dc45cfc7.png)
[nfs failed to mount problem] mount nfs: access denied by server while mounting localhost:/data/dev/mysql

ABAQUS 使用RSG绘制插件初体验

安装Office的一些工具

2. what is mechanical design?
![[nfs无法挂载问题] mount.nfs: access denied by server while mounting localhost:/data/dev/mysql](/img/15/cbb95ec823cdde5fb8f032dc45cfc7.png)
[nfs无法挂载问题] mount.nfs: access denied by server while mounting localhost:/data/dev/mysql
随机推荐
一文带你读懂内存泄露
卡尔加里大学|基于强化学习的推荐系统综述
delegate
AB打包有的Shader没有触发IPreprocessShaders的回调
[in depth understanding of tcapulusdb technology] how to take tcapulusdb off the shelf
matlab调用API
如何在 FlowUs和Notion 等笔记软件中进行任务管理?
C #, introductory tutorial -- a little knowledge about function parameter ref and source program
Compilation error: /usr/bin/ld: /usr/local/lib/libgflags a(gflags.cc.o): relocation R_ X86_ 64_ 32S against `. rodata‘
MySQL数据库DQL练习题
1.3----- simple setting of 3D slicing software
Velocity syntax
Altium Designer中off grid pin解决方法
从11小时到25秒--还有优化空间吗?
0816 shortcomings of Feida (improvement direction)
拓扑排序
C WinForm embedded flash
小甲鱼老师《带你学C带你飞》的后续课程补充
区间检索SQL性能优化方法
【深入理解TcaplusDB技术】TcaplusDB运维单据