title: DFS Graph Traversal to print all possible paths without missing any contributing edge
body: <p>I want to traverse a graph to extract all the possible paths from a node to another.  I found the DFS may missing some paths I want to maintained.
  For example, in the graph, I want to traverse the path from node 1 to node 5. The DFS seems to only get 1-> 2 -> 3 -> 5, without getting the 1-> 2 -> 3 ->4 ->2 -> 3 -> 5. Becuase when visiting node 4, its successor node 2 is vistited already. However, I also want the second path since I care about every possible contributing edge like 3 -> 4 and 4 -> 2.</p>
  
  <p>Currently, I just maintained lots of incomplete paths like 1->2 ->3 ->4 without the next part to the destination. To complete them, I tried to find the node 2 and concatenate it with the paths starting from node 2. I am not sure if it is the right solution. It seems still missing some possibilities. Is there any standard algorithm serving for this purpose?<br>
  <a href="https://i.stack.imgur.com/GGdsH.jpg" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/GGdsH.jpg" alt="enter image description here"></a></p>