Dijkstra's or not?

Revision en1, by DarkSilver, 2024-12-02 22:20:23

Given a directed graph, source node and destination node you have to start from source with value 1 and reach destination node along some path where each edge has a multiple associated with it. Find the maximum value you can attain? Assume, if cycles exists it does not increases value to greater than 1.

Can we use Dijkstra's algorithm here or a quadratic dp+dfs is more appropriate?

History

 
 
 
 
Revisions
 
 
  Rev. Lang. By When Δ Comment
en1 English DarkSilver 2024-12-02 22:20:23 406 Initial revision (published)