File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
src/data-structures/priority-queue Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change 1+ # Priority Queue
2+
3+ In computer science, a priority queue is an abstract data type
4+ which is like a regular queue or stack data structure, but where
5+ additionally each element has a "priority" associated with it.
6+ In a priority queue, an element with high priority is served before
7+ an element with low priority. If two elements have the same
8+ priority, they are served according to their order in the queue.
9+
10+ While priority queues are often implemented with heaps, they are
11+ conceptually distinct from heaps. A priority queue is an abstract
12+ concept like "a list" or "a map"; just as a list can be implemented
13+ with a linked list or an array, a priority queue can be implemented
14+ with a heap or a variety of other methods such as an unordered
15+ array.
16+
17+
18+
19+ ## References
20+
21+ [ Wikipedia] ( https://en.wikipedia.org/wiki/Priority_queue )
You can’t perform that action at this time.
0 commit comments