Search
⌘K

Leetcode 343. Integer Break

Given n, partition it into at least two positive integers to maximize the product of the parts and return that maximum product. This can be solved with dynamic programming or a math/greedy insight showing the optimal split uses as many 3s (then 2s) as possible.


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.