Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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
- Host: GitHub
- URL: https://github.com/fatihbaltaci/findingkshortestpath
- Owner: fatihbaltaci
- Created: 2017-02-08T01:26:41.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-02-08T01:39:39.000Z (over 7 years ago)
- Last Synced: 2023-09-07T15:13:49.896Z (about 1 year ago)
- Language: Java
- Homepage:
- Size: 3.91 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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