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).

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

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!