Added b-tree insertion (#30195)

* Added b-tree insertion

* Added Insertion
This commit is contained in:
kellyhuang21
2019-05-12 14:51:02 -07:00
committed by Randell Dawson
parent db22bd3547
commit 1a4d7a04ac

View File

@ -22,3 +22,6 @@ Search is similar to search in Binary Search Tree. Let the key to be searched be
Traverse:
Traversal is also similar to Inorder traversal of Binary Tree. We start from the leftmost child, recursively print the leftmost child, then repeat the same process for remaining children and keys. In the end, recursively print the rightmost child.
Insertion:
We insert into the bottom of a B-tree, similar to binary search trees. First, find an appropriate place at the bottom of the tree to insert a given key, and perform the insertion (also adding an additional empty child). If the node is too big (it has m keys and m + 1 (empty) children), split the node.