Skip to content

fatihbaltaci/FindingKShortestPath

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

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

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages