/*internal method to find the smallest item in subtree return node containing the smallest item *binarynode findminbinarynode * const ift =nullptr return nullptrift->left =nullptr return treturn findmint->left )figure recursive implementation of findmin for binary search trees /*internal method to find the largest item in subtree return node containing the largest item *binarynode findmaxbinarynode * const ift !nullptr whilet->right !nullptr ->rightreturn tfigure nonrecursive implementation of findmax for binary search trees figure binary search trees before and after inserting