Question

I am trying to implement a B+ tree. So far I have leaf node, root node, inner node classes. Inside my lead node class, I have a list for keys and a list for values. My question is that instead of having lists for values and keys, Can I have a map pairing key to value? If no, can you explain why.

Was it helpful?

Solution

Normally you would build a B+Tree from lower-level data structures.

A map is normally implemented as a Tree itself, so if you already have maps why are you implementing a B+Tree?

Even using a list is a bad fit... a B+ page should be implemented using only arrays (or even better raw bytes in which you allocate arrays).

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top