A m-way search tree is a tree in which
- The nodes hold between 1 to m-1 distinct keys
- The keys in each node are sorted
- A node with k values has k+1 subtrees, where the subtrees may be empty.
- The i’th subtree of a node [v1, ..., vk], 0 < i < k, may hold only values v in the range vi < v < vi+1 (v0 is assumed to
equal -
, and vk+1 is assumed to equal infty).
A m-way tree of height h has between h and mh - 1 keys.
- Search the key going down the tree until reaching an empty subtree
- Insert the key to the parent of the empty subtree, if there is room in the node.
|
 |
| insert 8 |
|
- Insert the key to the subtree, if there is no room in its parent.
|
 |
| insert 27 |
|
- If the key to be deleted is between two empty subtrees, delete it
|
 |
| delete 8 |
 |
- If the key is adjacent to a nonempty subtree, replace it with the largest key from the left subtree or the smallest key
from the right subtree