Deletion In B-Trees

http://install4install.com

In order to delete elements from B-Tree we need to ensure that their properties(Refer : http://letslearncs.com/b-trees/ does not get violated.It should remain a binary search tree and number of pointers must be according to the order and keys should be one less than the order in each and every node.

Example

Consider a B-tree of Fig 1.Say we want to delete 2,21,10,3 and 4 step by step from the tree.

Screen Shot 2014-05-29 at 4.58.17 PM

Fig 1 : B-Tree

 

Delete 2

 

Screen Shot 2014-05-29 at 5.02.50 PM

Fig 2 : Delete 2

 

Delete 21

 

Screen Shot 2014-05-29 at 5.07.01 PM

Fig 3 : Delete 21

 

Delete 10

Screen Shot 2014-05-29 at 5.15.41 PM

Fig 4 : Delete 10

 

Delete 3

Screen Shot 2014-05-29 at 5.36.18 PM

Fig 5 : Delete 3

 

Delete 4

Screen Shot 2014-05-29 at 5.47.33 PM

Fig 6 : Delete 4



Short URL: http://tinyit.cc/8bdf8c
Author: Cusp2207 on May 30, 2014
Category: Computer Science, Data Structures
Tags:

Leave a Reply

Last articles