You are viewing a single comment's thread. Return to all comments →
O(1) aka Constant time
You are not copying anything other than the pointer to the head node into the newly created node. Linked lists are not like arrays in that you don't have to copy elements to insert/delete elements.