What's the best way to find all possible paths in a given tree? Let's say I have a graph where a path exists between the following nodes
1,2
1,3
2,5
2,6
So I should get an output somewhat like this:- 1
1,2
1,3
1,2,5
1,2,6
2
2,5
2,6
2,1,3
and so on..