binary trees listing continued current current rightchildif(current =null/if end of the line /insert on right parent rightchild newnodereturn/end else go right /end while /end else not root /end insert(/public boolean delete(int key/delete node with given key /(assumes non-empty listnode current rootnode parent rootboolean isleftchild truewhile(current idata !key/search for node parent currentif(key current idata/go leftisleftchild truecurrent current leftchildelse /or go rightisleftchild falsecurrent current rightchildif(current =null/end of the linereturn false/didn' find it /end while /found node to delete /if no childrensimply delete it if(current leftchild==null &current rightchild==nullif(current =root/if rootroot null/tree is empty