Data Structures and Algorithms
with Object-Oriented Design Patterns in C#![]() ![]() ![]() ![]() ![]() |
Having already implemented the M-way search tree class, MWayTree,
we can make use of much the existing code to implement a B-tree class.
Program introduces the BTree class
which extends the class MWayTree class
introduced in Program
With the exception of the two methods which modify the tree,
Insert and Withdraw,
the BTree class inherits all its
functionality from the M-way tree class.
Of course, the Insert and Withdraw methods
need to be redefined in order to ensure that every time tree is modified
the tree which results is a B-tree.