In pointer implementation of linked lists, which operation can be performed in constant time (O(1)) when inserting or deleting nodes?
Show answerHide answer
Correct answer: (A) Inserting at the beginning
Explanation
Inserting at the beginning needs only to set newnode->next = head and head = newnode, which is O(1); inserting at the end or at a position requires traversal.