Frage

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.

War es hilfreich?

Lösung

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).

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top