Longest Path From Source To All Vertices | Graphs | C++ Solution
Longest Path From Source To All Vertices, is a Graphs related problem and in this post we will see how we can solve this challenge in C++
Find the longest path of all the vertices from the source vertex The graph is a weighted graph. Solution:Do topological sort to flatten the graph then make all the distances of all vertices from source minus infinity then for each vertex update the distance of its ajacent vertex from the source
Please check the main.cpp snippet for the solution.
This solution originally posted at: Github by @susantabiswas