retagged by
10,715 views

1 Answer

Best answer
5 5 votes

Queue using singly Linked List, enqueue will take O(n) and Dequeue will take O(1) time. 

Because for enqueue operation, insert at the tail of the linked list and for dequeue remove from the beginning of the linked list (FIFO).

but if we maintain an extra pointer both will take O(1).

selected by
Position:
Show:

Related questions

3 3 votes
4 4 answers
59.3k
59.3k views
Shubhanshu asked Jun 10, 2017
59,348 views
Which of the following is true about linked list implementation of queue?(a) In push operation, if new nodes are inserted at the beginning of linked list, then in pop ope...
2 2 votes
2 2 answers
2.4k
2.4k views
Gurdeep Saini asked Jan 2, 2019
2,358 views
true/false ?) if stack is implemented as a array,all operation push ,pop ,is emptystack(),delete stack() can be performed in constant time.)if stack is implemented as a l...
4 4 votes
1 answers 1 answer
2.2k
2.2k views
Hemant Parihar asked Jan 20, 2018
2,203 views
In implementation of queue using stack, deletion of second element from front take Ο(1) time, when insertion take Ο(n) time.Which of the following is correct ?True / Fals...
6 6 votes
3 3 answers
190
190 views
GO Classes asked Jul 8
190 views
A FIFO queue is represented using a circular linked list and only one external pointer $\text{Q}$.Design $1: \text{Q}$ points to the node containing the front item. Desig...