I am currently writing a PHP library for graphs. I have already implemented a single-path Dijkstra\'s algorithm successfully, but now struggle with implementing a multi-path ver
Like this? (Pseudocode):
function output_paths(source, dest, tail) { if source == dest: output([dest] + tail) for each node in prev[dest]: output_paths(source, node, [dest] + tail) } output_paths(source=A, dest=J, tail=[])