@@ -62,12 +62,11 @@ Rule #3: Leaf depth
62
62
All leaf nodes must be at the same depth from root.
63
63
64
64
## Complexity Analysis
65
- Search:
66
65
67
- ** Time** : O(bloga(n)) = O(logn)
66
+ ** Search, Insertion, Deletion Time** : O(bloga(n)) = O(logn)
68
67
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.
71
70
72
71
** Space** : O(n)
73
72
@@ -81,9 +80,25 @@ a value t >= 2, known as its minimum degree.
81
80
- Every internal node other than the root has at least t children.
82
81
- Following this definition, t = a in the naming convention of (a,b) trees.
83
82
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
85
96
![ split child] ( ../../../../../docs/assets/images/btreesplitchild.jpeg )
86
97
Image Source: https://www.geeksforgeeks.org/insert-operation-in-b-tree/
87
98
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
+
88
103
## References
89
104
This description heavily references CS2040S Recitation Sheet 4.
0 commit comments