insertions and deletions algorithms for inserting or deleting entries of binary search tree are fairly straightforwardalthough not trivial insertion the map command [kvas supported by the setitem methodbegins with search for key (assuming the map is nonemptyif foundthat item' existing value is reassigned otherwisea node for the new item can be inserted into the underlying tree in place of the empty subtree that was reached at the end of the failed search the binary search tree property is sustained by that placement (note that it is placed exactly where search would expect itpseudo-code for such treeinsert algorithm is given in in code fragment algorithm treeinsert(tkv)inputa search key to be associated with value treesearch(tt root()kif = key(then set ' value to else if key(then add node with item ( ,vas left child of else add node with item ( ,vas right child of code fragment algorithm for inserting key-value pair into map that is represented as binary search tree an example of insertion into binary search tree is shown in figure ( (bfigure insertion of an item with key into the search tree of figure finding the position to insert is shown in ( )and the resulting tree is shown in (