Does java have an indexed minimum priority queue?
我需要它来实现Dijkstra算法,并且我有我自己的实现,但是使用java自己的类来记录我的代码会更容易。
No, Java standard library has no such data structure. I think most people use this: http://algs4.cs.princeton.edu/24pq/IndexMinPQ.java.html
What do you mean 'indexed'? Priority queue doesn't support indexing, unless it won't be queue any more.
Java supports standard Priority Queue like C++ STL. It can be found in java.util namespace as PriorityQueue.
链接地址: http://www.djcxy.com/p/59132.html上一篇: 在AHK脚本的开头部分,星号是什么意思?
下一篇: java是否有索引最小优先级队列?