Difference between priority queue and a heap

后端 未结 5 1279
我在风中等你
我在风中等你 2021-01-30 16:38

It seems that a priority queue is just a heap with normal queue operations like insert, delete, top, etc. Is this the correct way to interpret a priority queue? I know you can b

5条回答
  •  南笙
    南笙 (楼主)
    2021-01-30 17:09

    Not really. The "priority" in the name stems from a priority value for the entries in the queue, defining their ... of course: priority. There are many ways to implement such a PQ, however.

提交回复
热议问题