Question 9
Consider the following class :
Consider an implementation of a linked list where each node is created using the given class . Suppose it has a variable that points to the first node of the linked list.
Suppose we want to perform the following operations on the linked list containing nodes: Insertion of a new node at the first position of the linked list1. Insertion of a new node at the last position of the linked list2. Deletion of the first node of the linked list3. Deletion of the last node of the linked list4. Using the most efficient algorithm, which of the following options correctly represents the time complexity of the above operations respectively?
—
—
—
—