One of the practical exercises that has been set for my course is to implement a B+ tree in Java. Sounds fairly easy right? Just implement a tree and make a few changes for search and insert/delete.
Not quite, I'm currently on my 3rd attempt to get a working tree. This time I'm successful (though delete is still to be implemented). The difference - I've moved away from recursive techniques for insertion to making use of a stack I can access programatically. This means as the child nodes are split, I can update up the tree making further splits as required. Once the stack is empty and if a split is still required, I can then simply create a new root.
Yay! Now to get on with the rest of it.
No comments:
Post a Comment