I have a list of paths (unidentified paths, that is, I do not know all the paths beforehand) A ->B-> C-D, A -> A-> B-> C,A->B-> C->B->C ->D
I need to get all different paths which user use to get from A ->D Under this condition, A->B->C ->D and using backforth/loops like A->B-> C->B->C ->D will qualify as one path.
This seems like a common algorithm or pattern recognition. My only caveat is I don't know the different paths/nodes beforehand (the number of nodes is finite though).
Has someone seen similar use case or can give pointers on how to proceed with it?