InterviewSolution
Saved Bookmarks
| 1. |
When the topological sort of a graph is unique?(a) When there exists a hamiltonian path in the graph(b) In the presence of multiple nodes with indegree 0(c) In the presence of single node with indegree 0(d) In the presence of single node with outdegree 0I have been asked this question during a job interview.My question comes from Topological Sort topic in portion Miscellaneous of Data Structures & Algorithms II |
|
Answer» Right answer is (a) When there exists a hamiltonian PATH in the graph |
|