Thursday, December 20, 2012

Find Out Whether There Is a Route Between Two Nodes

Book: Cracking the Coding Interview
Question: 4.2 (page 86)

Given a directed graph, design an algorithm to find out whether there is a route between two nodes.

Solution: Complexity - O(V+E)


No comments:

Post a Comment