Typescript Constant Time O(1)
Based on observations by leetcode user kevin_gunner, the largest product will be obtained by dividing the number into as many threes as possible, combined with 
Based on [observations by leetcode user kevin_gunner](https://leetcode.com/problems/integer-break/discuss/80923/O(n)-time-complexity-O(1)-space-Java-solution), the largest product will be obtained by dividing the number into as many threes as possible, combined with either a 4 or a 2.\n\ne.g. 10 = 3 * 3 * 4 = 36\ne.g. 14 = 3 * 3 * 3 * 3 * 2 = 162\ne.g. 15 = 3 * 3 * 3 * 3 * 3 = 243\n\nYou must take care to deal with the base cases of 2 and 3, which cannot follow this rule since they can\'t be split into 3s with either a 2 or 4 remainder.\n\n```\nfunction integerBreak(n: number): number {\n    // 2 and 3 can\'t be split into 3s, so handle them separately.\n    if(n === 2) return 1;\n    if(n === 3) return 2;\n    switch(n % 3) {\n        // Split this number into one less than as many 3s as possible and one 4.\n        case 1: return 4 * Math.pow(3, Math.floor(n/3)-1);\n        // Split this number into as many 3s as possible and one 2\n        case 2: return 2 * Math.pow(3, Math.floor(n/3));\n\t\t// Split this number into entirely threes.\n        case 0: return Math.pow(3, n/3);\n    }\n}\n```
['TypeScript', 'JavaScript']