An open API service indexing awesome lists of open source software.

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.

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.java

2. **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.