sec lists /linked list implementation class llist implements list private link head/pointer to list header private link tail/pointer to last element protected link curr/access to current element int cnt/size of list //constructors llist(int sizethis()/constructor -ignore size llist(curr tail head new link(null)/create header cnt public void clear(/remove all elements head setnext(null)/drop access to links curr tail head new link(null)/create header cnt /insert "itat current position public void insert( itcurr setnext(new link(itcurr next()))if (tail =currtail curr next()/new tail cnt++public void append( it/append "itto list tail tail setnext(new link(itnull))cnt++/remove and return current element public remove(if (curr next(=nullreturn null/nothing to remove it curr next(element()/remember value if (tail =curr next()tail curr/removed last curr setnext(curr next(next())/remove from list cnt--/decrement count return it/return value figure linked list implementation