Easy to Understand --> Recursive--> Memoization faster than 100% solutions
So first I have written the recursive approach of the solution. This is done by multiplying i * Math.max(n-i,solve(n-i));\nThis means that when I\'m subtacting 
So first I have written the recursive approach of the solution. This is done by multiplying i * Math.max(n-i,solve(n-i));\nThis means that when I\'m subtacting 4 by 1 I\'m getting (4-1) = 3 so now  a possible solution may be 1*(4-1 =3) = 3 or 1*(solve(3))<-- this is passd back into the recursion where 3 can be written as 1 *(3-1=2) = 3 0r 1*(solve(3-1));\nusing this approach only I have used memoization int the second step to make it optimized \n\n\n```\nclass Solution {\n    public int integerBreak(int n) {\n        return solve(n);\n        \n    }\n    public static int solve(int n){\n        if(n == 1){\n            return 1;\n        }\n        int max = 0;\n        for(int i =1 ; i<=n-1 ; i++){\n            int num1 = i;\n            int num2 = n-i;\n            int x = num1 * Math.max(n-i,solve(n-i));\n            max = Math.max(max,x);\n            \n        }\n        return max;\n    }\n}\n```\nMemoised Code:\n\n\n```\nclass Solution {\n    public int integerBreak(int n) {\n        int[] dp = new int[n+1];\n        return solve(n,dp);\n        \n    }\n    public static int solve(int n,int[] dp){\n        if(n == 1){\n            return dp[n] = 1;\n        }\n        if(dp[n] != 0){\n            return dp[n];\n        }\n        int max = 0;\n        for(int i =1 ; i<=n-1 ; i++){\n            int x = i * Math.max(n-i,solve(n-i,dp));\n            max = Math.max(max,x);\n            \n        }\n        return dp[n] = max;\n    }\n}\n```
['Dynamic Programming', 'Recursion', 'Memoization', 'Java']