@@ -0,0 +1,571 @@
+package problems;%0A%0Apublic class IntegerBreak %7B%0A%0A  static long%5B%5D A = new long%5B100%5D;%0A%0A  public long integerBreak(int n) %7B%0A    A%5B1%5D = 1;%0A    for (int i = 1; i %3C n; i++) %7B%0A      long left = Math.max(i, getMax(i));%0A      long right = Math.max(n - i, getMax(n - i));%0A      A%5Bn%5D = Math.max(left * right, A%5Bn%5D);%0A    %7D%0A    return A%5Bn%5D;%0A  %7D%0A%0A  private long getMax(int n) %7B%0A    if (A%5Bn%5D == 0)%0A      A%5Bn%5D = integerBreak(n);%0A    return A%5Bn%5D;%0A  %7D%0A%0A  public static void main(String%5B%5D args) %7B%0A    IntegerBreak ib = new IntegerBreak();%0A%0A    System.out.println(ib.integerBreak(99));%0A  %7D%0A%7D%0A

Add Integer Break