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 operation, nodes must be removed from end.
(b) In push operation, if new nodes are inserted at the end, then in pop operation, nodes must be
removed from the beginning.
(c) Both of the above
(d) None of the above
Answer is (C)
But my doubt here is that:-
If we are allowed to use only singly linked list then option a) will take O(n) time to remove a node from the end of the linked list. So, in this case i.e. in case of singly linked list with O(1) TC answer should be (b)
But If we are allowed to use doubly linked list then answer should be C only
ryt?