I have a Directed Acyclic graph, something like this:
[a, b, c] --> [p, q] --> [p, a, c] --> [x, y, z]
Here, each of the alphabets is a node.
From the above graph, I want the list of all the graphs having single nodes.
eg
One graph can be: a --> p --> a --> y
Another can be: b --> p --> p --> z etc.
I can do a depth-first search (DFS) on the main graph to traverse it, but I'm not sure how to do multiple DFS to extract every graph having single character