linked structures head tail newnode (ahead tail (bfigure appending node to linked list using tail reference(athe links required to append the nodeand (bthe resulting list after appending into the list following the last node the next field of the node referenced by tail is set to point to the new node the tail reference has to be adjusted to point to the new node since tail must always point to the last node in the list the linked list resulting from appending to the list is illustrated in figure (bif the list is emptythere is no existing node in which the link field can be adjusted insteadboth the head and tail references will be null in this casethe new node is appended to the list by simply adjusting both external references to point to the new node the code for appending node to the linked list is provided in listing it assumes the existence of both the head and tail reference variables listing appending node to linked list using tail reference given the head and tail pointersadds an item to linked list newnode listnodeitem if head is none head newnode else tail next newnode tail newnode removing nodes removing node from linked list in which both head and tail references are used requires simple modification to the code presented earlier in the consider the sample list in figure in which we want to delete the node containing after unlinking the node to be removedwe must check to see if it was at the end