public int numTrees(int n) {
        int[] numbers = new int[n+1];
        for(int i=0;i<n+1;i++)
        {
            if(i==0)
                numbers[i] = 1;
            else
                numbers[i] = this.calcNumbers(i, numbers);
        }
        return numbers[n];
    }