86.0k views
2 votes
If a priority queue is being implemented using an unordered list, what is the Big-O complexity of the Enqueue operation?

1 Answer

2 votes

Answer:

the answer is O(1)

Step-by-step explanation:

A priority queue is a type of queue whereby each of the elements are linked with a priority and the elements are served according to their priority.

The word enqueue means to add elements to the back of the queue

For this question, while using an unordered list, O(1) is the big-O complexity of the enqueue operation. O(1) is a natural Choice for queues.

User Kaedys
by
6.1k points