notes here it isl so our general algorithm isto delete nif it has two subtreesreplace the value in with the largest value in its left subtree and then delete the node with the largest value from its left subtree note the largest value in the left subtree will never have two subtrees whybecause if it' the largest value it cannot have right subtree finallythere is nothing special about the left subtree we could do the same thing with the right subtreejust use the smallest value in the right subtree to delete node from binary search tree the method to be used depends on whether node to be deleted has one childtwo childrenor has no child deletion of node with two children if the node to be deleted has two childrenthen the value is replaced by the smallest value in the right sub tree or the largest key value in the left sub treesubsequently the empty node is recursively deleted consider the bst in figure figure binary search tree if the node is to be deleted then first its value is replaced by smallest value in its right subtree by so we will have figure lovely professional university