Print all the paths present between 2 points in a graph.
Asked in the Round 1 stage. Reported follow-up: print only the shortest paths.
Implement all_paths(graph, start, end). graph is a dictionary mapping each vertex to a list of directly reachable vertices. Return a list of paths, where each path is a list of vertices from start to end. A path may not repeat a vertex. Return an empty list when no path exists. The output order may follow DFS traversal order.
def all_paths(graph, start, end):