mirror of
https://github.com/trekhleb/javascript-algorithms.git
synced 2026-03-13 08:51:02 +08:00
Partial translation of Simplified Chinese (#185)
* init * init * init * init
This commit is contained in:
committed by
Oleksii Trekhleb
parent
68af4fc165
commit
872521fb03
15
src/data-structures/priority-queue/README.zh-CN.md
Normal file
15
src/data-structures/priority-queue/README.zh-CN.md
Normal file
@@ -0,0 +1,15 @@
|
||||
# 优先队列
|
||||
|
||||
在计算机科学中, **优先级队列(priority queue)** 是一种抽象数据类型, 它类似于常规的队列或栈, 但每个元素都有与之关联的“优先级”。
|
||||
|
||||
在优先队列中, 低优先级的元素之前前面应该是高优先级的元素。 如果两个元素具有相同的优先级, 则根据它们在队列中的顺序是它们的出现顺序即可。
|
||||
|
||||
优先队列虽通常用堆来实现,但它在概念上与堆不同。优先队列是一个抽象概念,就像“列表”或“图”这样的抽象概念一样;
|
||||
|
||||
正如列表可以用链表或数组实现一样,优先队列可以用堆或各种其他方法实现,例如无序数组。
|
||||
|
||||
|
||||
## 参考
|
||||
|
||||
- [Wikipedia](https://en.wikipedia.org/wiki/Priority_queue)
|
||||
- [YouTube](https://www.youtube.com/watch?v=wptevk0bshY&list=PLLXdhg_r2hKA7DPDsunoDZ-Z769jWn4R8&index=6)
|
||||
Reference in New Issue
Block a user