@@ -62,12 +62,11 @@ Rule #3: Leaf depth
6262All leaf nodes must be at the same depth from root.
6363
6464## Complexity Analysis
65- Search:
6665
67- ** Time** : O(bloga(n)) = O(logn)
66+ ** Search, Insertion, Deletion Time** : O(bloga(n)) = O(logn)
6867
69- - The max height of an (a,b) tree is O(loga(n)).
70- - Linear search takes maximally b nodes per level.
68+ - The max height of an (a,b) tree is O(loga(n)).
69+ - Linear search takes maximally b nodes per level.
7170
7271** Space** : O(n)
7372
@@ -81,9 +80,25 @@ a value t >= 2, known as its minimum degree.
8180- Every internal node other than the root has at least t children.
8281- Following this definition, t = a in the naming convention of (a,b) trees.
8382
84- ## Split Child Method
83+ ## Search Operation
84+ Here is an outline of the search operation:
85+ 1 . Begin the search at the root of the B tree.
86+ 2 . If the key being searched for is in the current node, return true (i.e. found).
87+ 3 . Else, determine the child node where the key might be located based on comparison with the keys in the current node.
88+ 4 . Recursively perform the search operation in the determined child node.
89+ 5 . If the search reaches a leaf node, and the key is not found, return false (i.e. not found).
90+
91+ ## Insert Operation
92+ You can read more about how the insert operation works
93+ [ here] ( https://www.geeksforgeeks.org/insert-operation-in-b-tree/ ) .
94+
95+ ### Split Child Method
8596![ split child] ( ../../../../../docs/assets/images/btreesplitchild.jpeg )
8697Image Source: https://www.geeksforgeeks.org/insert-operation-in-b-tree/
8798
99+ ## Delete Operation
100+ The delete operation has a similar idea as the insert operation, but involves a lot more edge cases. If you are
101+ interested to learn about it, you can read more [ here] ( https://www.geeksforgeeks.org/delete-operation-in-b-tree/ ) .
102+
88103## References
89104This description heavily references CS2040S Recitation Sheet 4.
0 commit comments