什么是MinPQ

今天看《算法》图论的最小生成树部分,里面有一行代码不是很理解

private MinPQ<Edge> pq;

上中文互联网上没查到资料,去外网查了一下。

The MinPQ class represents a priority queue of generic keys. It supports the usual insert and delete-the-minimum operations, along with methods for peeking at the maximum key, testing if the priority queue is empty, and iterating through the keys.
The insert and delete-the-minimum operations take logarithmic amortized time. The min, size, and is-empty operations take constant time. Construction takes time proportional to the specified capacity or the number of items used to initialize the data structure.
This implementation uses a binary heap.

翻译就不做了,相信学计算机的这点英文还是有的。

posted @ 2020-03-26 23:57  endevelop  阅读(382)  评论(0)    收藏  举报