Search code examples
binary-search-treeb-tree

Deleting a node in a B-Tree - using inorder Predecessor vs. Successor as the replacement key


Suppose I wanted to delete 70 from the tree using inorder Predecessor as the replacement key and then after that using inorder Successor as the replacement key.

enter image description here

What would be the difference between the two?


Solution

  • deletion using inorder Predecessor

    This is deletion of 70 using inorder Predecessor deletion using inorder Succesor

    This is deletion of 70 using inorder Successor