https://github.com/sancakerkan/shortestpath_dijkstra
This project implements the solution to find the shortest path in a directed graph using Dijkstra's algorithm.
https://github.com/sancakerkan/shortestpath_dijkstra
digraph dijkstra-algorithm dijkstra-shortest-path graphs java shortest-path-algorithm
Last synced: 3 months ago
JSON representation
This project implements the solution to find the shortest path in a directed graph using Dijkstra's algorithm.
- Host: GitHub
- URL: https://github.com/sancakerkan/shortestpath_dijkstra
- Owner: sancakerkan
- License: mit
- Created: 2024-06-30T21:58:05.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2024-06-30T22:02:54.000Z (11 months ago)
- Last Synced: 2025-01-10T02:20:12.006Z (4 months ago)
- Topics: digraph, dijkstra-algorithm, dijkstra-shortest-path, graphs, java, shortest-path-algorithm
- Language: Java
- Homepage:
- Size: 5.86 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ShortestPath_Dijkstra
This project implements the solution to find the shortest path in a directed graph using Dijkstra's algorithm. The starting point is 0, and the finish points are 1, 2, and 3. The program reads the graph data from a text file, constructs the graph, and then finds the shortest paths.
## Project Structure
The project consists of three main Java classes and one text file:
1. **HW3_Q2_solution.java**: The main program that solves the shortest path problem.
2. **FileRead.java**: A class that reads graph data from a text file.
3. **ValueFinder.java**: A class that converts values from the text file into integers and creates the directed graph.
4. **HW3_Q2.txt**: A text file containing the graph data.## How to Compile and Run
1. **Compile the Java files**:
```sh
javac HW3_Q2_solution.java FileRead.java ValueFinder.java2. **Run the main program**:
```sh
java HW3_Q2_solution### Important : Make sure text file is readable
## License
This project is licensed under the MIT License - see the [LICENSE](https://github.com/sancakerkan/ShortestPath_Dijkstra/blob/main/LICENSE) file for details.