Ecosyste.ms: Awesome

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

Awesome Lists | Featured Topics | Projects

https://github.com/fatihbaltaci/findingkshortestpath

Finds K shortest paths(1. shortest path, 2. shortest path, 3. shortest path, ..., K. shortest path) with their lengths
https://github.com/fatihbaltaci/findingkshortestpath

Last synced: 10 days ago
JSON representation

Finds K shortest paths(1. shortest path, 2. shortest path, 3. shortest path, ..., K. shortest path) with their lengths

Awesome Lists containing this project

README

        

# FindingKShortestPath

Input File:

S:5,D:13
1. 5(3),8(2),3(5)
2. 3(10),4(4)
3. 6(2),3(5)
.
.
.
N. ... ,... ,...

S: Starting Index, D: Destination Index

1 ------3------> 5 (From 1 to 5, path length is 3)
1 ------2------> 8 (From 1 to 8, path length is 2)
1 ------5------> 3 (From 1 to 3, path length is 5)

2 ------10------> 3 (From 2 to 3, path length is 10)
2 ------4------> 4 (From 2 to 4, path length is 4)
...

Output File:

K shortest paths(1. shortest path, 2. shortest path, 3. shortest path, ..., K. shortest path) with their lengths

Running The Program

```
javac Main.java
java Main
```

Note: input.txt file must be exist. You can change it in 23.line of Main.java