Which statement about Topological Sort is correct?
Choose an option to check your answer.
The defining property is that it exists only for directed acyclic graphs.
The other statements describe different structures or concepts.
Practice Data Structures 300 Unique questions with answers and explanations.
Choose an option to check your answer.
The defining property is that it exists only for directed acyclic graphs.
The other statements describe different structures or concepts.
Choose an option to check your answer.
Topological Sort fits because it supports scheduling tasks with dependencies and it exists only for directed acyclic graphs.
Both clues point to this choice.
Choose an option to check your answer.
Disjoint Set Union is a structure that maintains a partition of elements into disjoint sets.
This description distinguishes it from the other choices.
Choose an option to check your answer.
Breadth-First Search is a graph traversal that explores vertices level by level.
This description distinguishes it from the other choices.
Choose an option to check your answer.
Breadth-First Search is commonly used for shortest paths in unweighted graphs.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
The defining property is that it typically uses a queue.
The other statements describe different structures or concepts.
Choose an option to check your answer.
Breadth-First Search fits because it supports shortest paths in unweighted graphs and it typically uses a queue.
Both clues point to this choice.
Choose an option to check your answer.
Depth-First Search is a traversal that explores as deeply as possible before backtracking.
This description distinguishes it from the other choices.
Choose an option to check your answer.
Adjacency List fits because it supports sparse graphs and its space usage is proportional to vertices plus edges.
Both clues point to this choice.
Choose an option to check your answer.
Adjacency Matrix is a square matrix indicating which vertex pairs are connected.
This description distinguishes it from the other choices.
Choose an option to check your answer.
Adjacency Matrix is commonly used for dense graphs and constant-time edge-existence tests.
Its design supports this task efficiently or naturally.
Choose an option to check your answer.
The defining property is that its space usage is quadratic in the number of vertices.
The other statements describe different structures or concepts.