@ Ankur,
This problem looks deceptively simple but unfortunately its not and
DFS alone cannot solve this problem.

Consider the following case in point :-
           C
A-->B /   \D--->E
         \ F/
Directed Edges are {A->B, B->C, C->D, D->E, B->F, F->D}

If we want to find all the possible path between A and E.
DFS will give us only one of the two (possible) paths between A and E.

Backtracking is the only technique I know we can fall back upon!




On Aug 27, 8:45 am, ankur aggarwal <[email protected]> wrote:
> > @
> > _dufus
>
> > i also think dfs can solve this problem widout topological sort

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Algorithm Geeks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at http://groups.google.com/group/algogeeks
-~----------~----~----~----~------~----~------~--~---

Reply via email to