1.

Topological sorting of a graph represents _______ of a graph.(a) linear probing(b) linear ordering(c) quadrilateral ordering(d) insertion sortingI got this question in an interview.My query is from Trees in portion Trees of Discrete Mathematics

Answer»

Correct answer is (B) linear ordering

Explanation: TOPOLOGICAL sorting for Directed Acyclic GRAPH (DAG) is a linear ordering of vertices such that for every directed edge uv, VERTEX u comes before V in the ordering. If the graph is not a DAG, topological sorting for a graph is not possible.



Discussion

No Comment Found

Related InterviewSolutions