131k views
1 vote
In a linked chain implementation of a queue, the performance of the enqueue operation

A. O(1)

B.O(n)

C.O(logn)

D.O(n2)

User Cwhsu
by
4.6k points

1 Answer

2 votes

Answer:

A.O(1)

Step-by-step explanation:

In the implementation of queue by using linked chain the performance of the enqueue operation is O(1).We have to maintain two pointers one head and the other tailand for enqueue operation we have to insert element to the next of the tail and then make that element tail.Which takes O(1) time.

User Jtromans
by
6.1k points