Use list of lists to save every path in a graph
问题 I have to implement dfs algorithm to save all paths from a starting node. So for example i have the following graph: i have a list path = [] to save all the paths starting from node 1. So my list will have only the starting node 1: 1, then i will check for neighbors of 1 which is the node 2 and the list will be: [1,2] . Now i check the neighbors of 2 which are 3 and 4. The list now i think that it will be like [[1,2,3], [1,2,4]] and in the end the final list will be [[1,2,3], [1,2,4,5], [1,2