chap listsstacksand queues head curr tail (ahead curr tail (bfigure insertion using header nodewith curr pointing one node head of the current element (alinked list before insertion the current node contains (blinked list after inserting the node containing figure shows the definition for the linked list classnamed llist class llist inherits from the abstract list class and thus must implement all of class list' member functions implementation for most member functions of the list class is straightforward howeverinsert and remove should be studied carefully inserting new element is three-step process firstthe new list node is created and the new element is stored into it secondthe next field of the new list node is assigned to point to the current node (the one (afterthe node that curr points tothirdthe next field of node pointed to by curr is assigned to point to the newly inserted node the following line in the insert method of figure actually does all three of these steps curr setnext(new link(itcurr next()))operator new creates the new link node and calls the constructor for the link classwhich takes two parameters the first is the element the second is the value to be placed in the list node' next fieldin this case "curr next figure illustrates this three-step process once the new node is addedtail is pushed forward if the new element was added to the end of the list insertion requires th( time removing node from the linked list requires only that the appropriate pointer be redirected around the node to be deleted this memory will eventually be reclaimed by the garbage collector the following lines from the remove method of figure do precisely this it curr next(element()/remember value curr setnext(curr next(next())/remove from list