Insert a node at the head of a linked list

  • + 2 comments

    What is the Big O notation for this code? Does creating a pointer to the head of the list actually copy it all over again one by one? if not, is it constant time?