removing an element from singly linked list removing an element from the head of singly linked list is essentially the reverse operation of inserting new element at the head this operation is illustrated in figure and given in detail in code fragment head lax msp atl bos (ahead lax msp atl bos (bhead msp atl bos (cfigure removal of an element at the head of singly linked list(abefore the removal(bafter "linking outthe old head(cfinal configuration algorithm remove first( )if head is none then indicate an errorthe list is empty head head next {make head point to next node (or none) size size {decrement the node countcode fragment removing the node at the beginning of singly linked list unfortunatelywe cannot easily delete the last node of singly linked list even if we maintain tail reference directly to the last node of the listwe must be able to access the node before the last node in order to remove the last node but we cannot reach the node before the tail by following next links from the tail the only way to access this node is to start from the head of the list and search all the way through the list but such sequence of link-hopping operations could take long time if we want to support such an operation efficientlywe will need to make our list doubly linked (as we do in section