Question

What is a key characteristic regarding negative edge weights in the Floyd-Warshall algorithm?

A It cannot handle any negative edge weights.
B It can handle negative edge weights, but not negative cycles.
C It can handle negative cycles, but not negative edge weights.
D It only works with graphs where all edge weights are positive.
E It requires all edge weights to be integers.
Practice Next

Hey! Ask a query