[PR #1538] [CLOSED] feat: Add Dijkstra's Algorithm with priority queue #2145

Open
opened 2026-01-29 15:29:31 +00:00 by claunia · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/TheAlgorithms/C/pull/1538
Author: @joaovicenteft
Created: 12/2/2025
Status: Closed

Base: masterHead: feature/dijkstra-with-priority-queue


📝 Commits (1)

  • cd02d45 feat: Add Dijkstra's Algorithm with priority queue

📊 Changes

1 file changed (+189 additions, -0 deletions)

View changed files

math/dijkstra_priority_queue.c (+189 -0)

📄 Description

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.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/TheAlgorithms/C/pull/1538 **Author:** [@joaovicenteft](https://github.com/joaovicenteft) **Created:** 12/2/2025 **Status:** ❌ Closed **Base:** `master` ← **Head:** `feature/dijkstra-with-priority-queue` --- ### 📝 Commits (1) - [`cd02d45`](https://github.com/TheAlgorithms/C/commit/cd02d45caf5f112107f514669badba12e82a1ef7) feat: Add Dijkstra's Algorithm with priority queue ### 📊 Changes **1 file changed** (+189 additions, -0 deletions) <details> <summary>View changed files</summary> ➕ `math/dijkstra_priority_queue.c` (+189 -0) </details> ### 📄 Description 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-29 15:29:31 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/C#2145