neuromancer
neuromancer

Reputation: 55489

B-trees that use redistribution on insertion

If I insert the letters A, G, I, and Y into a B-tree of order 4 (meaning 4 pointers and 3 elements in each node), I get the following B-tree.

  G
 / \
A   IY

Would it look any different if redistribution on insertion were used? How does redistribution on insertion work?

Upvotes: 3

Views: 2122

Answers (1)

Pops
Pops

Reputation: 30828

This question is kind of circular. Often, redistribution in data structures is done for balancing purposes. B-trees are balanced by their nature, so the question would become "what reason would you have for redistributing on insertion?" And in that case, the algorithm would depend on what you were trying to achieve.

B-trees can perform redistribution on deletion; is that what you meant? Or, do you have any reference links?

Upvotes: 1

Related Questions