Java Solution (Observation)
Intuition\n1. We must try to figure out if there\'s any number when repeated multiple times gives the maximum product. For example, if \'n\' is 12 and we split 
# Intuition\n1. We must try to figure out if there\'s any number when repeated multiple times gives the maximum product. For example, if \'n\' is 12 and we split it like - 2 + 2 + 2 + 2 + 2 + 2 this will give sum as 12 and the product will be 2 to the power 6 = 64 but is there any other number which results in a better way ?\n\n# Approach\n1. We can observe that if we try to take 3 multiple times it will always give us the maximum value.\n2. Proof - 12 -> 3 * 3 * 3 * 3 = 81, any number greater than 3 will not give us the desired output. 12 -> 4 * 4 * 4 = 64\n3. Now what is the given number is not a multiple of 3 then in that case we can take how many 3\'s we can take. For example, 8 -> number of threes possible is 8 / 3 -> 2 and remaining number will be (n - (numberOfThrees * 3)) -> (8 - (2 * 3)) = 2. So we will multiply 3 two times and then multiply 2 with the result -> (3 * 3 * 2) = 18.\n4. Our above approach will fail for certain test cases like n = 13 -> (3 * 3 * 3 * 3 * 1) = 81 but we can get more than this value. So in that case we just need to remove one 3 and then check what will be the product. 13 -> (3 * 3 * 3 * 4) = 108.\n5. So finally we can conclude that, if the number is divisible by 3 then just return the result as 3 to the power of number of threes and if it is not divisible by 3 then return the maximum result from point number 3 and 4.\n6. We need to figure out what will the answer for n <= 5 because it is mentioned that it must be splitted in at least 2 parts. So we can calculate it on paper and right those cases beforehand. Like for n = 4 -> (2 * 2) because (3 * 1) will not give desired output. For n = 3 -> (2 * 1) because according to our approach it would have given us 3 as the answer because 3 is divisible by 3.\n\n# Complexity\n- Time complexity: O(log(n)), where n = number of threes\n\n- Space complexity: O(1)\n\n# Code\n```\nclass Solution {\n    public int integerBreak(int n) {\n        if(n == 2) {\n            return 1;\n        }\n        if(n == 3) {\n            return 2;\n        }\n        if(n == 4) {\n            return 4;\n        }\n        if(n == 5) {\n            return 6;\n        }\n        int numberOfThrees = n / 3;\n        if(n % 3 == 0) {\n            return (int)Math.pow(3 , numberOfThrees);\n        }\n        int remainingNumber = n - (3 * numberOfThrees);\n        int ans1 = (int)Math.pow(3 , numberOfThrees) * remainingNumber;\n        remainingNumber = n - (3 * (numberOfThrees - 1));\n        int ans2 = (int)Math.pow(3 , numberOfThrees - 1) * remainingNumber;\n        return Math.max(ans1 , ans2);\n    }\n}\n```
['Math', 'Java']