Computer Science and Engineering › Graph › Question #5653
Single Choice Easy

QWhat is a topological sort?

ID: #5653 Graph 172 views
Question Info
#5653Q ID
EasyDifficulty
GraphTopic

Choose the Best Option

Click any option to instantly check if you're correct.

  • A A way to sort the vertices of a graph based on their degrees ✔ ✖
  • B A way to sort the vertices of a graph based on their distances from a particular node ✔ ✖
  • C A way to sort the vertices of a directed acyclic graph based on their dependencies ✔ ✖
  • D A way to sort the edges of a graph based on their weights ✔ ✖
Correct Answer

Explanation

A way to sort the vertices of a directed acyclic graph based on their dependencies.

Note: A topological sort is only possible for a directed acyclic graph (DAG) as there should not be any cycles in it. It provides a linear ordering of the vertices such that for every directed edge uv from vertex u to vertex v, u comes before v in the ordering.

Share This Question

Challenge a friend or share with your study group.