DarkSilver's blog

By DarkSilver, history, 3 hours ago, In English

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?

  • Vote: I like it
  • 0
  • Vote: I do not like it

»
5 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

Dijkstra won't work for this problem.