Skip to content

Conversation

@joaovicenteft
Copy link

Adds Dijkstra's algorithm using a min-heap priority queue as requested in #1537.

  • Graph: Adjacency list with weights.
  • PQ: Binary heap with insert/decrease simulation.
  • Example: 5-node graph, outputs shortest distances from node 0.

Tested with GCC; no memory leaks.

Fixes #1537.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE] Add Dijkstra's Algorithm with priority queue

1 participant