Skip to content

Commit a7322a8

Browse files
committed
Add README.
1 parent 629de0b commit a7322a8

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
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)

0 commit comments

Comments
 (0)