else first previous newlinknewlink next firstfirst newlink/newlink <-last /newlink <-old first /newlink --old first /first --newlink the insertlast(method is the same process applied to the end of the listit' mirror image of insertfirst(the insertafter(method inserts new link following the link with specified key value it' bit more complicated because four connections must be made first the link with the specified key value must be found this is handled the same way as the find(routine in the linklist program earlier in this thenassuming we're not at the end of the listtwo connections must be made between the new link and the next linkand two more between current and the new link this is shown in figure figure insertion at an arbitrary location if the new link will be inserted at the end of the listthen its next field must point to nulland last must point to the new link here' the insertafter(code that deals with the linksif(current==last/if last linknewlink next null/newlink --null last newlink/newlink <-last else /not last linknewlink next current next/newlink --old next /newlink <-old next current next previous newlinknewlink previous current/old current <-newlink current next newlink/old current --newlink perhaps you're unfamiliar with the use of two dot operators in the same expression it' natural extension of single dot operator the expression