hussainmansour / Graph-Algorithms

this is the implementation of three famous graph algorithms Dijkstra BellmanFord and floydWarshall

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Graph-Algorithms

the implementation of the most popular Graph Algorithms(dijkstra, bellmanFord, floydWarshall). and a command line interface for interaction with the Algorithms.

dijkstra(int source): Finds the shortest path from a source node to all other nodes in the graph using Dijkstra's algorithm. Returns an array of distances from the source node to all other nodes in the graph.

bellmanFord(int source): Finds the shortest path from a source node to all other nodes in the graph using the Bellman-Ford algorithm. Returns an array of distances from the source node to all other nodes in the graph, or null if a negative cycle exists.

floydWarshall(): Finds the shortest path between all pairs of nodes in the graph using the Floyd-Warshall algorithm. Returns a 2D array of shortest path distances between all pairs of nodes in the graph.

About

this is the implementation of three famous graph algorithms Dijkstra BellmanFord and floydWarshall


Languages

Language:Java 100.0%