Starting from:

$34.99

CSE208 Offline Assignment 2 Solution


You are going to implement the Bellman-Ford algorithm (a single source shortest path algorithm in graphs) for the second offline assignment of this semester. Please consider the following requirements.
1. The time complexity of your implementation should be O(|V|.|E|), where V and E are respectively the sets of vertices and edges of the input graph.
2. Your algorithm should be able to handle edges with negative weight.
3. Your algorithm should be able to detect the existence of negative cycles in the input graph.
4. You can’t use standard template library in your implementation.
5. Make sure your code is well-organized so you can use it for solving other problems.
6. Use file operations for input and output.

More products