Priority queue: Difference between revisions
Content added Content deleted
m (added whitespace, centered the priority and tasks.) |
m (added whitespace.) |
||
Line 26: | Line 26: | ||
The implementation should try to be efficient. A typical implementation has O(log n) insertion and extraction time, where '''n''' is the number of items in the queue. |
The implementation should try to be efficient. A typical implementation has '''O(log n)''' insertion and extraction time, where '''n''' is the number of items in the queue. |
||
You may choose to impose certain limits such as small range of allowed priority levels, limited capacity, etc. If so, discuss the reasons behind it. |
You may choose to impose certain limits such as small range of allowed priority levels, limited capacity, etc. If so, discuss the reasons behind it. |