×

Multiple-Choice Questions

What type of graph edges does Dijkstra's Algorithm not handle correctly?

6. What type of graph edges does Dijkstra's Algorithm not handle correctly?

  1. Parallel edges
  2. Negative weights
  3. Zero-weight edges
  4. All of the above

Answer

The correct answer is: C) Zero-weight edges

Explanation

Dijkstra's Algorithm fails with graphs with negative weight edges because it assumes that once a node's shortest path is found, it cannot be improved, which is not true in the presence of negative weights.

Comments and Discussions!

Load comments ↻






Copyright © 2024 www.includehelp.com. All rights reserved.