head prednode tail curnode figure deleting the last node in list using tail reference of the list if it waswe must adjust the tail reference to point to the same node as prednodewhich is now the last node in the list the code for removing an item from linked list using tail reference is shown in listing if the list contains single nodethe head reference will be assigned none when it is assigned the contents of the node' next field the tail reference will also be set to none when it is set to prednode listing removing node from linked list using tail reference given the head and tail referencesremoves target from linked list prednode none curnode head while curnode is not none and curnode data !target prednode curnode curnode curnode next if curnode is not none if curnode is head head curnode next else prednode next curnode next if curnode is tail tail prednode the sorted linked list the items in linked list can be sorted in ascending or descending order as was done with sequence consider the sorted linked list illustrated in figure the sorted list has to be created and maintained as items are added and removed head figure sorted linked list with items in ascending order