343. Integer Break
Practice Integer Break for free on NudgeCode: Medium, Dynamic Programming pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.
Split the integer n into a sum of at least two positive integers. Return the largest product those integers can have.
Example
n = 2 -> 1 (1 + 1)
n = 10 -> 36 (3 + 3 + 4)
Constraints
- 2 <= n <= 58