+0  
 
0
597
1
avatar+12 

"Given a DAG (directed acyclic graph) G=(V,E) with weighted edges. Suggest an O(|V|+|E|) time algorithm for finding the weight of the maximum weight path in G". I know I need topoligical sort here, but how can I continue from this?

 Oct 5, 2015
 #1
avatar+6248 
+5

This isn't quite what you're after but I suspect it can be simply modified to look for the max weight path vs. the longest path.

 

http://www.geeksforgeeks.org/find-longest-path-directed-acyclic-graph/

 Oct 5, 2015

3 Online Users

avatar
avatar