General Algorithm to insert a node into B tree
1.
Find the node into which new key should be
inserted by doing search using binary search logic
2.
if the node is not full, insert the key into the
node using an appropriate sorting algorithm
3.
if the node is full, split the node into two and
push the key upward into the parent node
4.
if the parent node is also full, follow the same
procedure until either some space is found in a previously existing node or a
new root node is created
No comments:
Post a Comment