Skip to content

Floyd-Warshall shortest path algorithm implementations in C.

Notifications You must be signed in to change notification settings

alexgian1/Floyd-Warshall_Shortest-Path

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

20 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Floyd-Warshall Shortest Path Algorithm

Contains 3 different implementations of Floyd-Warshall algorithm in C:

  1. Recursive
  2. Recursive with memorisation
  3. Dynamic Programming (with path reconstruction)
    *To disable path reconstruction comment the line "#DEFINE PATH".

Input

  • Number of nodes
  • Distance of:
    node1->node0
    node2->node1    node2->node0
    node3->node2    node3->node1    node3->node0
    (0 if there is no path)



Example:
5
3
1 0
2 4 7
3 0 0 8

alt text

Releases

No releases published

Packages

No packages published

Languages