Skip to content
Snippets Groups Projects
Commit 87cb7607 authored by Mohamed Awadalla's avatar Mohamed Awadalla
Browse files

Updates for 23sp

parent c4734db3
Branches master
No related tags found
No related merge requests found
......@@ -4,6 +4,13 @@ import java.util.List;
public interface BellmanFordSolver {
/**
* Determine if the graph contains any negative-cost cycles by constructing a predecessor array
* and using GraphUtil.getCycle to generate the resulting List (see GraphUtil.java)
* @param adjMatrix adjacency matrix
* @param source starting node
* @return cycle, as a list, or empty list if there is no cycle
*/
List<Integer> solve(int[][] adjMatrix, int source);
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment