Question: Suppose a queue is implemented using a singly linked list(not circular). The queue has two pointers one points to the head node and another one

Suppose a queue is implemented using a singly linked list(not circular). The queue has two pointers one points to the head node and another one pointers to the tail node, as shown in the figure Let n is the number of nodes in the queue Let 'enqueue be implemented by inserting a new node at the head, and 'dequeue be implemented by deletion of a node from the tail Which one of the following is the time complexity of the most time efficient implementation of enqueue' and 'dequeue, respectively, for this data structure? ...se head tall Select one O a O(1), O(1) Ob 0(1), O(n) Oc O(n), O(1) Od O(n), O(n) airau
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
