简体   繁体   English

建议遍历B +树的算法

[英]Suggest an algorithm to traverse a B+ tree

Please suggest me an algorithm that will traverse a B+ tree of order 4 and display on the screen all its integer key entries in order of keys (smaller keys first). 请给我建议一种算法,该算法将遍历4阶的B +树,并在屏幕上按键顺序显示其所有整数键项(首先是较小的键)。 I have to write this in C++, but even pseudo code would be appreciated. 我必须用C ++编写,但即使是伪代码也将不胜感激。 Or even a small guide to write the algorithm will help. 甚至编写该算法的小指南也会有所帮助。 Thanks. 谢谢。

我认为这是一种很好的方法,可以预先使用深度优先遍历标记访问的节点,以避免再次遍历访问的节点

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM