Back to problems

Maximum Product Path in a Complete Directed Graph

Algorithm · Two Sigma · Hard

Requirements You are given a complete directed graph whose edge weights are all positive. Determine a node-simple path—one that never revisits a vertex—that yields the largest possible multiplication of its edge weights. The path must start at start, may end at any vertex, and may stop before visiting all vertices. Edge weights may be less than 1, equal to 1, or greater than 1. Return both the maximum product and the selected route.

Checking your access…