In linked list if we want to insert an element in the beginning then time complexity is O(1)
in linked list if we want to insert an element at the last or in between then time complexity is O(n)
if we want to implement queue using linked list ,in queue we have two pointers front and rear ,insertion is done using rear pointer and deletion is done using rear pointer ,if head of linked list is rear pointer(for insertion) means enqueue operation so time complexity will be O(1) and tail pointer as front pointer (for deletion) means dequeue so time complexity will be O(n)