Deletion in binary search tree

Explain how deletion is performed in the binary search tree.

E

Expert

Verified

The three processes are described below:

a) If the node is a leaf, then it can be deleted instantly.

b) If the node consists of one child then the node can be deleted after its parent adjusts a pointer to bypass node.

c) If the node consists of two children the general strategy is to substitute the data of this node with the smallest data of the right sub tree and recursively delete the node that is empty.

   Related Questions in Data Structure & Algorithms

©TutorsGlobe All rights reserved 2022-2023.