trees this strategy does not work if the key that guides the operator is only part of larger structure if that is the casethen we can keep all of the structures that have the same key in an auxiliary data structuresuch as list or another search tree figure shows the code for the insertion routine lines and recursively insert and attach into the appropriate subtree notice that in the recursive routinethe only time that changes is when new leaf is created when this happensit means that the recursive routine has been called from some other nodepwhich is to be the leaf' parent the call /*internal method to insert into subtree is the item to insert is the node that roots the subtree set the new root of the subtree *void insertconst comparable xbinarynode ift =nullptr new binarynodexnullptrnullptr }else ifx element insertxt->left )else ift->element insertxt->right )else /duplicatedo nothing /*internal method to insert into subtree is the item to insert by moving is the node that roots the subtree set the new root of the subtree *void insertcomparable &xbinarynode ift =nullptr new binarynodestd::movex )nullptrnullptr }else ifx element insertstd::movex ) ->left )else ift->element insertstd::movex ) ->right )else /duplicatedo nothing figure insertion into binary search tree