Description
Under datastructures/graphs/ there are two Dijkstra variants:
Keeping a naive O(V²) version alongside an "optimized" one is mostly a maintenance burden. For an educational repo it is clearer to expose one correct, efficient implementation: the priority-queue based version running in O((V + E) log V).
Proposed change
- Keep a single Dijkstra implementation based on a
PriorityQueue.
- If the naive version is kept for teaching purposes, document explicitly why both exist and how they differ in complexity, instead of leaving two near-identical classes side by side.
Related
Companion to #7454, which removes the misplaced third copy in others/.
Description
Under
datastructures/graphs/there are two Dijkstra variants:DijkstraAlgorithm.javaDijkstraOptimizedAlgorithm.javaKeeping a naive O(V²) version alongside an "optimized" one is mostly a maintenance burden. For an educational repo it is clearer to expose one correct, efficient implementation: the priority-queue based version running in O((V + E) log V).
Proposed change
PriorityQueue.Related
Companion to #7454, which removes the misplaced third copy in
others/.