https://github.com/ashworth3/dijkstragraphsolver
Efficient C++ graph pathfinding using Dijkstra’s algorithm and a custom-built min-heap. Reads graphs from file and supports shortest path queries with a simple interactive CLI.
https://github.com/ashworth3/dijkstragraphsolver
algorithms-and-data-structures cli-app cpp dijkstra
Last synced: 7 months ago
JSON representation
Efficient C++ graph pathfinding using Dijkstra’s algorithm and a custom-built min-heap. Reads graphs from file and supports shortest path queries with a simple interactive CLI.
- Host: GitHub
- URL: https://github.com/ashworth3/dijkstragraphsolver
- Owner: ashworth3
- Created: 2025-04-19T09:22:53.000Z (7 months ago)
- Default Branch: main
- Last Pushed: 2025-04-19T09:48:24.000Z (7 months ago)
- Last Synced: 2025-04-19T15:35:11.492Z (7 months ago)
- Topics: algorithms-and-data-structures, cli-app, cpp, dijkstra
- Language: C++
- Homepage:
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# DijkstraGraphSolver
A C++ implementation of Dijkstra’s algorithm featuring a custom min-heap and dynamic adjacency list. Built as an interactive CLI-based pathfinding tool that reads graphs from file and supports both directed and undirected modes. Allows users to run shortest path queries, print paths and distances, and visualize the adjacency list. Emphasizes efficient heap operations and memory-safe graph traversal through modular design.
---
## Features
- Supports directed and undirected graphs (D, UD)
- Dynamic adjacency list construction
- Custom min-heap for efficient pathfinding
- Prints adjacency lists, path, and path lengths
- Interactive CLI menu
---
## Files
- `main.cpp` – Main source file with full implementation
- `network01.txt` – Sample graph (8 nodes, 14 edges)
- `network02.txt` – Sample graph (8 nodes, 11 edges)
---
## How to Compile
```bash
g++ main.cpp -o dijkstra
```
---
## How to Run
```bash
./dijkstra
```
---
## Example Menu
1. Read graph from file (enter filename, D or UD, + flag)
Enter: network01.txt UD 2
Enter number of vertices: 8
## Author
Created by [@ashworth3](https://github.com/ashworth3)