Help with the approach and code in C++. Thanks I have tried Dijkstra by make every edge weights to -1. But I am not able to print the longest path.
How can I print the longest path in a graph given the Graph is a unweighted DAG.
Help with the approach and code in C++. Thanks I have tried Dijkstra by make every edge weights to -1. But I am not able to print the longest path.