B树在Java中实现。 [英] B trees implementation in java .

查看:236
本文介绍了B树在Java中实现。的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于B树的实现,我应该使用哪种数据结构来存储密钥值?我应该使用int类型,整数类型或链接列表或其他类型的数组。



我尝试过:



我在Java中实现B树的代码。

For Implementation of B trees what data structure should I use to store the key values ? Should I use array of int type , Integer type or maybe linked list or something else .

What I have tried:

I am implementing code for B trees in Java .

推荐答案

Key 值通常存储在叶节点中的b树结构中。



表示键可能存储在b树中,但通常你会将它们存储在别处并且叶节点Key / Value - >Key / pointer指向另一个结构,如果值很大(按字节顺序)。



实际的键/值或键/指针通常存储在数组或列表中,具体取决于搜索,插入和移动数据时要具有的功能在叶子节点周围。
Key values are usually stored within the b-tree structure in the leaf nodes.

Values for keys may be stored in the b-tree, but usually you would store them elsewhere and have leaf node "Key/Value"->"Key/pointer" point to another structure if the values are large (byte wise).

The actual "key/value" or "key/pointers" are usually stored in an array or list, depending on the functionality you want to have while searching, inserting and moving data around in the leaf nodes.


这篇关于B树在Java中实现。的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆