If you discover the pattern, you can easily see that the problem is recursive.

```
class Solution {
public:
int integerBreak(int n) {
if (n < 3) return 1;
if (n == 3) return 2;
return maxSumProd(n);
}
int maxSumProd(int n) {
return (n <= 4)? n : 3 * maxSumProd(n-3);
}
};
```