STRUCTURE IMPLEMENTATION

To implement the B-Tree structure in Java we will need a constructor which can create a node of the proper order. It must create enough space for the keys and children based on that order.

Notice that the type will have to be recursive. Since Java doesn't have explicit pointers, the children of a node will just be more B-Tree nodes.

Finally, it will be important that we can tell the difference between a leaf and interior node.

Here is one possible (cleanly compiling) idea for the basics of a Java class for B-Trees.

NEXT BACK