We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
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?
Insert a node at the head of a linked list
You are viewing a single comment's thread. Return to all 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?