tutorials icon indicating copy to clipboard operation
tutorials copied to clipboard

dijkstra | can we use PriorityQueue (min Heap)

Open krishnaexplore opened this issue 8 years ago • 1 comments

can we use PriorityQueue (min heap) instead of settled and unsettled?

https://github.com/eugenp/tutorials/blob/master/algorithms/src/main/java/com/baeldung/algorithms/ga/dijkstra/Dijkstra.java#L14:L15

krishnaexplore avatar May 15 '18 09:05 krishnaexplore

Sure, but the algorithm changes a bit. Have a look here for an example implementation: https://github.com/vaishnav/Dijkstra

lor6 avatar May 20 '18 11:05 lor6