chap listsstacksand queues curr insert (acurr (bfigure insertion for doubly linked lists the labels and correspond to assignments done by the linked list node constructor marks the assignment to curr->next marks the assignment to the prev pointer of the node following the newly inserted node the three parameters to the new operator allow the list node class constructor to set the elementprevand next fieldsrespectivelyfor the new link node the new operator returns pointer to the newly created node the nodes to either side have their pointers updated to point to the newly created node the existence of the header and tailer nodes mean that there are no special cases to be worried about when inserting into an empty list the list class append method from figure is also simple againthe link class constructor sets the elementprevand next fields of the node when the new operator is executed method remove (illustrated by figure is straightforwardthough the code is somewhat longer firstthe variable it is assigned the value being removed note that we must separate the elementwhich is returned to the callerfrom the link object the following lines then adjust the list it curr next(element()/remember value curr next(next(setprev(curr)curr setnext(curr next(next())/remove from list the second line makes the next node' prev pointer point to the left of the node being removed finallythe next field of the node preceding the one being deleted is adjusted the final steps of method remove are to update the list length and return the value of the deleted element