Search
⌘K

Leetcode 3387. Maximize Amount After Two Days of Conversions

Given two exchange graphs (day1 and day2) with multiplicative rates (each edge is invertible), find the maximum amount of the starting currency obtainable by doing any sequence of conversions on day1 followed by any on day2. This reduces to computing, for every currency, the maximum product reachable from the start in day1 and the maximum product back to the start in day2, then taking the best combined multiplier.


Question Timeline

See when this question was last asked and where, including any notes left by other candidates.

Comments

Your account is free and you can post anonymously if you choose.