tutorials
tutorials copied to clipboard
dijkstra | can we use PriorityQueue (min Heap)
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
Sure, but the algorithm changes a bit. Have a look here for an example implementation: https://github.com/vaishnav/Dijkstra