Java DP solution
public int integerBreak(int n) {\n           int[] dp = new int[n + 1];\n           dp[1] = 1;\n           for(int i = 2; i <= n; i ++) {\n               for(in
    public int integerBreak(int n) {\n           int[] dp = new int[n + 1];\n           dp[1] = 1;\n           for(int i = 2; i <= n; i ++) {\n               for(int j = 1; j < i; j ++) {\n                   dp[i] = Math.max(dp[i], (Math.max(j,dp[j])) * (Math.max(i - j, dp[i - j])));\n               }\n           }\n           return dp[n];\n        }
[]