문제

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.

도움이 되었습니까?

해결책

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

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top