I've searched on here for how to find the longest simple path in a directed cyclic graph (simple meaning that each node is visited only once, to avoid the path being infinite), and have came across solutions like this. All such solutions I've found however only show how to calculate the length of the longest path, not the actual nodes involved in that path.
My question is hence, how could an algorithm like that be modified so that it extracted the nodes involved in the longest path? Similar to how the Floyd-Warshall all-pairs shortest path algorithm may be modified to allow path reconstruction.