当前位置:网站首页>满k叉树编号为 i 的节点的孩子编号公式推导
满k叉树编号为 i 的节点的孩子编号公式推导
2022-06-11 16:58:00 【wozaizhe.55】
结论
满k叉树编号为i的节点第一个孩子的编号 j 满足
;
推导过程
设: 节点 i 处在该 m 叉树的第 h层, (h = 1, 2, 3...)
则 前 h - 1 层共有
个节点
同理 前 h 层共有
个节点
显然 i 是第 h 层的
个节点, 即 节点i 有
个左兄弟
故节点i 的第一个孩子 j 有
个左兄弟
由此可得 j在第h + 1 层中的位置为 
那么 节点j 在整棵满 k叉树的编号为
即 
整理可得: 
边栏推荐
- Leetcode 450. Deleting a node in a binary search tree
- Characteristics of interfaces & comparison between interfaces and abstract classes
- 接口的特点&&接口与抽象类的对比
- JSP page initial loading method
- Switching power supply circuit diagram and principle 12V analysis - detailed version
- Le compte de titres de l'école de commerce kainiu est - il sécurisé? Frais d'ouverture de compte
- Char array parsing
- Kernel density estimation (2D, 3D)
- 2022熔化焊接与热切割上岗证题目及模拟考试
- Classic reading of multi task learning: MMOE model
猜你喜欢

2022 simulated examination question bank and simulated examination for crane driver (limited to bridge crane)

所见即所得的 markdown 编辑器:Typora

多任务学习经典品读:MMoE模型篇

2022高压电工特种作业证考试题库及在线模拟考试

Analysis report on sales status and supply and demand prospects of phosphoric acid fuel cell industry in the world and China 2022-2028 Edition

^32执行上下文栈面试题

Common tools and commands for information collection

2022 national question bank and mock examination for safety officer-b certificate
![[pytest learning] after the pytest case fails to execute, the others will not be executed](/img/c7/52ae88cde65bdd12ae8b86df5c477f.png)
[pytest learning] after the pytest case fails to execute, the others will not be executed

RSP: An Empirical Study of remote sensing pre training
随机推荐
数据库全量SQL分析与审计系统性能优化之旅
Oracle数据库合并行记录,WMSYS.WM_CONCAT 函数的用和MySQL 中GROUP_CONCAT(id)的使用及比较。
485 days, 21 experiences of my remote office sharing | community essay solicitation
How unittest knows the execution time of each test case
Leetcode 1974. Minimum time to type words using a special typewriter (yes, once)
DFS和BFS笔记(一)基于C语言的广度优先搜索
C语言:使用.h和.c文件遇到的问题总结
LeetCode-859. 亲密字符串
A journey of database full SQL analysis and audit system performance optimization
Kernel density estimation (2D, 3D)
关联关系
二级造价工程师值得考吗?发展前景如何?
Katalon Studio Enterprise
RSP:遥感预训练的实证研究
从0到1了解Prometheus
Weekly recommended short video: rookie CEO talks about the new logistics track in the future
(validation file) validatejarfile report errors
Switching power supply circuit diagram and principle 12V analysis - detailed version
Time series prediction | MATLAB realizes future multi-step prediction of RBF RBF neural network time series
基于文本驱动用于创建和编辑图像(附源代码)