1.

Which of the following is not an application of Depth First Search?(a) For generating topological sort of a graph(b) For generating Strongly Connected Components of a directed graph(c) Detecting cycles in the graph(d) Peer to Peer NetworksThis question was posed to me by my college director while I was bunking the class.This intriguing question originated from Depth First Search in section Graph Search of Data Structures & Algorithms II

Answer»

Right CHOICE is (d) Peer to Peer Networks

The best explanation: Depth First Search is USED in the Generation of topological SORTING, Strongly CONNECTED COMPONENTS of a directed graph and to detect cycles in the graph. Breadth First Search is used in peer to peer networks to find all neighbourhood nodes.



Discussion

No Comment Found

Related InterviewSolutions