Wednesday, March 07, 2007

Is it a Tree?

Given number of nodes of a directed Graph (n and named from 1 to n),
and all the edges in the graph of the form (a,b) where a is the start and b is the end of the edge.

Can you suggest a algorithm to check its a tree or not.