I think this problem is same as topological sorting with n1 as start node and n2 as finish node. Can be done using DFS.
_dufus On Aug 26, 1:33 pm, ankur aggarwal <ankur.mast....@gmail.com> wrote: > given a directed graph and node n1 and n2 > find all possible path between them > > i think graph is acyclic .. > otherwise there are infinte path we can write > > eg > > for node "a" and "d" are there > we have a cycle node "b" to "c" and "c" to "b" > > a-> b->c->b->d > a-> b->c->b->c->b->d > etc --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Algorithm Geeks" group. To post to this group, send email to algogeeks@googlegroups.com To unsubscribe from this group, send email to algogeeks+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/algogeeks -~----------~----~----~----~------~----~------~--~---