Graph Algorithms

Answer & solution
Official answer: C
The standard Bellman-Ford algorithm performs up to n−1 full edge-relaxation passes. A complete graph has Θ(n²) edges, yielding Θ(n³) time, C, for the usual worst-case/full-pass algorithm.
One relaxation pass examines all edges. The standard algorithm allows n−1 passes because a simple shortest path can use up to n−1 edges. A complete directed graph has n(n−1) edges; an undirected one has n(n−1)/2, both Θ(n²). Multiplying by Θ(n) passes gives Θ(n³). Early termination may improve a particular instance, but does not change the stated standard worst-case/full-pass bound.