public int numTrees2(int n){
        if(n == 0 || n == 1) return 1;
        int result = 0;
        for(int i = 0; i < n; i++){
            result += numTrees2(i) * numTrees2(n - i - 1);
        }
        return result;
    }