Singly Linked List Insertion at Beginning



The steps to insert a node at the beginning of the list are as follows:
  1. Create new node
  2. Set the new node's link to be a copy of Head's Link.
  3. Set Head's Link to point to the new node
Insertion at the beginning of a Singly Linked List is O(1).
A new node, Ruler was added to the beginning of the list, and this is the new layout for the Singly Linked List.