I have a fully working B-Tree, and I want to convert this into a B+tree. Is there any way that I can achieve that without changing so much of my code? is it possible?
Asked
Active
Viewed 651 times
1 Answers
2
Is there any way that I can achieve that without changing so much of my code?
Nope. Significant amount of change is required. B+ tree doesn't store data pointer in non-leaf nodes.

mushfek0001
- 3,845
- 1
- 21
- 20
-
Can you maybe point out to me what needs to be one to achieve that? – David Mar 31 '15 at 13:18
-
Sure. Right now every node has a pointer for holding your data right? For B+ tree keep two type of nodes: indexNode and leafNode. indexNode only a key and pointer to other nodes. LeafNode will contain another extra data pointer. I'll recommend you to implement the whole thing from scratch. There are so many online materials on how to construct and manipulate B+ trees. Since you already know how B-tree works you will pick up B+ tree easily. Here's a good resource to get started http://dblab.cs.toronto.edu/courses/443/2014/05.btree-index.html – mushfek0001 Mar 31 '15 at 13:35