Question says: Implementing a queue using Singly Linked List with head and tail pointer.
It is also given that:-
rear==head of SLL && front == tail of SLL.So,
For Enqueue():- Insert a node at beginning of SLL. =O(1).
For Dequeue():-Delete a node from end of SLL. That requires the pointer of second last node (n-1)th node to delete last node . To traverse till 2nd last node it will take O(n).So,overall TC to dequeue is==O(n).
Note: We know that we have the pointer to the last node(tail pointer) after every Enqueue but ,since it is SLL se cannot move to prev node.
Correct Answer:B