</>OfferRetriever
DashboardDiscuss
NEW

Spring Hire Sale

Limited Time Deal: Unlock all premium questions for over 30% off

$10.42$7.08

08

:

03

:

14

:

03

Get this deal
Back to Dashboard

Maximum Multiplier Path

Hard

You are given a directed graph with n nodes labeled 0 through n - 1. Each directed edge connects node u to node v and carries an integer multiplier w (between 1 and 10 inclusive). A path's product is the result of multiplying all the edge weights along that path.

Find the maximum product achievable on any simple path (no repeated nodes) from start to end. If no path exists from start to end, return -1. ...