listing linked lists continued /(assumes non-empty listlink temp lastif(first next =null/if only one item first null/first --null else last previous next null/old previous --null last last previous/old previous <-last return temp//insert dd just after key public boolean insertafter(long keylong dd/(assumes non-empty listlink current first/start at beginning while(current ddata !key/until match is foundcurrent current next/move to next link if(current =nullreturn false/didn' find it link newlink new link(dd)/make new link if(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 return true/found itdid insertion /public link deletekey(long key/delete item wgiven key /(assumes non-empty listlink current first/start at beginning