Break a positive integer into the sum of at least two positive integers and return the maximum product
<p>So this is a recent interview question, Given a positive integer n, break it into the sum of at least two positive integers and maximize the product of those integers. Return the maximum product you can get.</p>

<blockquote>
  <p>For example, given n = 2, return 1 (2 = 1 + 1); given n = 10, return
  36 (10 = 3 + 3 + 4).</p>
</blockquote>

<p>I'm trying to solve it recursively, The approach is 
first split the number into two halves and find the max product and keep splitting each half till we get the maximum.</p>

<p>This is my code,</p>

<pre><code>private int integerBreak(int n, int maxProduct){

        int index = 0;
        for(int i=0; i&lt;n; i++){
            if((i * (n-i)) &gt;maxProduct) {
                maxProduct = i*(n-i);
                index = i;
            }
        }
        return integerBreak(index, index) * integerBreak(n - index, n-index);
    }
    public int integerBreak(int n) {

        int maxProduct = 0;
        return integerBreak(n, maxProduct);

    }
</code></pre>

<p>Now I'm a little lost with the base condition as to how to terminate recursion. I'd appreciate if someone can help me with my approach rather than coming up with the completely different solution.</p>