### B+ tree removal

Hi everyone, I have posted my original question on stack overflow. Please take a look at it and if you could offer me some help it would be great. Thanks.

https://stackoverflow.com/questions/47683203/b-tree-removal
Last edited on
So, what is your problem? Please elaborate.
@coder777, thanks for reaching out to help. I have done few steps of the B+ tree removal, but then I get stuck and I don't know how to go further. I have posted my incomplete solution and the original question on stack overflow since it allows users to post pictures. If you could explain this to me visually it would be great.

So do you have problems with the algorithm? It is less complicated than you probably think it is.

The point of removal of a value is that you take the neighbors value. I.e. commit a removal on the neighbor.

Before you can actually take a value from the neighbor you need to check whether it is possible. Means whether it would fall below the threshold.

If the neighbor falls below the threshold and the the current node falls below the threshold take all the values from the neighbor node and destroy it.

If the neighbor falls below the threshold and the the current node does not fall below the threshold just remove the value from the current node.

If the neighbor does not fall below the threshold the value can be taken right away (i.e. invoke the remove function of that node).
Registered users can post here. Sign in or register to post.