Does java have an indexed minimum priority queue?

后端 未结 2 587
无人共我
无人共我 2021-02-08 10:07

I need it for an implementation of Dijkstra\'s algorithm, and I do have my own implementation but documenting my code would be easier with java\'s own classes.

2条回答
  •  情书的邮戳
    2021-02-08 10:48

    No, Java standard library has no such data structure. I think most people use this: http://algs4.cs.princeton.edu/24pq/IndexMinPQ.java.html

提交回复
热议问题