From a7322a88eb3dd496baa91cce8934f41e5a6dae6b Mon Sep 17 00:00:00 2001 From: Oleksii Trekhleb Date: Sat, 14 Apr 2018 09:33:38 +0300 Subject: [PATCH] Add README. --- src/data-structures/priority-queue/README.md | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 src/data-structures/priority-queue/README.md diff --git a/src/data-structures/priority-queue/README.md b/src/data-structures/priority-queue/README.md new file mode 100644 index 00000000..ed2dd55a --- /dev/null +++ b/src/data-structures/priority-queue/README.md @@ -0,0 +1,21 @@ +# Priority Queue + +In computer science, a priority queue is an abstract data type +which is like a regular queue or stack data structure, but where +additionally each element has a "priority" associated with it. +In a priority queue, an element with high priority is served before +an element with low priority. If two elements have the same +priority, they are served according to their order in the queue. + +While priority queues are often implemented with heaps, they are +conceptually distinct from heaps. A priority queue is an abstract +concept like "a list" or "a map"; just as a list can be implemented +with a linked list or an array, a priority queue can be implemented +with a heap or a variety of other methods such as an unordered +array. + + + +## References + +[Wikipedia](https://en.wikipedia.org/wiki/Priority_queue)