How does the presence of cycles in a graph affect the possibility of performing topological sorting?

  • Cycles have no impact on topological sorting.
  • Cycles make topological sorting deterministic.
  • Cycles make topological sorting impossible.
  • Cycles make topological sorting more efficient.
The presence of cycles in a graph makes topological sorting impossible. Topological sorting is designed for directed acyclic graphs (DAGs), and cycles introduce ambiguity in the order of nodes, preventing a clear linear ordering of vertices.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *