@@ -7,7 +7,7 @@ A B-Tree is a self-balancing search tree, in which nodes can have more than two
7
7
A B-Tree of order * n* satisfies the following properties:
8
8
- Every node has at most * 2n* keys.
9
9
- Every node (except root) has at least * n* keys.
10
- - Eyery non-leaf node with * k* keys has * k+1* children.
10
+ - Every non-leaf node with * k* keys has * k+1* children.
11
11
- The keys in all nodes are sorted in increasing order.
12
12
- The subtree between two keys * k* and * l* of a non-leaf node contains all the keys between * k* and * l* .
13
13
- All leaves appear at the same level.
@@ -47,10 +47,10 @@ This is necessary because nodes have to know the order of the tree.
47
47
or reach the end of the array.
48
48
3 . If ` k == l ` then we have found the key.
49
49
4 . If ` k < l ` :
50
- - If the node we are on is not a leaf, then we go to the left child of ` l ` , and perform the steps 3.-5. again.
50
+ - If the node we are on is not a leaf, then we go to the left child of ` l ` , and perform the steps 3 - 5 again.
51
51
- If we are on a leaf, then ` k ` is not in the tree.
52
52
5 . If we have reached the end of the array:
53
- - If we are on a non-leaf node, then we go to the last child of the node, and perform the steps 3.-5. again.
53
+ - If we are on a non-leaf node, then we go to the last child of the node, and perform the steps 3 - 5 again.
54
54
- If we are on a leaf, then ` k ` is not in the tree.
55
55
56
56
### The code
0 commit comments