So I have this B+ tree:
I have to delete 49 here. How do I go about it?
Will it be like this:
Or like this? :
Hence, we end up with root node (32)--->(32,40,48) on the right sub-tree of the root.
In-depth explanation:
There are 3 cases for deleting a key. After deleting a key for node,
If node still contains more than floor((n+1)/2) keys:
If node contains less than floor((n+1)/2) keys:
** For cases 2 and 3, always remember to update parent nodes after borrowing or merging.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.