Lookup in B-Trees
For simplicity we will assume no duplicate keys. To search for a record with key K:
- If at a leaf, look among the keys, follow pointer `K` if exists to record.
-
For an interior node, if `K` is less than the first key or greater than the last,
follow the pointer to the left/right. If `K_i le K lt K_{i+1}` then follow the pointer to the right of `K_i`.