Examveda

What is the primary goal of the Bellman-Ford algorithm?

A. To find the shortest path from a single source to all other vertices, even with negative weights.

B. To find the minimum spanning tree.

C. To detect cycles in a directed graph.

D. To sort vertices in topological order.

Answer: Option A


This Question Belongs to Data Structure >> Graphs

Join The Discussion

Related Questions on Graphs

What is a cycle in a graph?

A. A path that starts and ends at the same vertex with no other repetitions.

B. A path that includes all vertices exactly once.

C. A path with no edges.

D. A complete traversal of all vertices.