linked structures prepending nodes when working with an unordered listnew values can be inserted at any point within the list since we only maintain the head reference as part of the list structurewe can simply prepend new items with little effort the implementation is provided in listing prepending node can be done in constant time since no traversal is required listing prepending node to the linked list given the head pointerprepend an item to an unsorted linked list newnode listnodeitem newnode next head head newnode suppose we want to add the value to our example list shown in figure (aadding an item to the front of the list requires several steps firstwe must create new node to store the new value and then set its next field to point to the node currently at the front of the list we then adjust head to point to the new node since it is now the first node in the list these steps are represented as dashed lines in figure (bnote the order of the new links since it is important we first link the new node into the list before modifying the head reference otherwisewe lose head (ahead newnode (bhead (cfigure prepending node to the linked list(athe original list from figure (blink modifications required to prepend the nodeand (cthe result after prepending