The diagrams in the following table represent a progression of inserts into an empty linked list.
Match the following lines of code with the appropriate illustration on the left.

Use each line only once:

  1. currPtr=head;
  2. newNodePtr=new ListElement(8,NULL);
  3. currPtr->next=newNodePtr;
  4. head=newNodePtr;
  5. newNodePtr=new ListElement(2,NULL);
  6. currPtr=newNodePtr;

Note what changes from one picture to the next. This represents the sequence of operations.