public int minLen(int target) {
        int[] data = new int[target + 1];
        /* Pre-Computation */
        for (int i = 1; i * i <= target; i++) {
            data[i * 1] = 1;
        }
        // DP{N} = min(DP{N - i * i} + 1)
        for (int i = 1; i < target + 1; i++) {
            int tempMin = i;
            for (int j = 1; j * j <= i; j++) {
                int temp = data[i - j * j] + 1;
                tempMin = Math.min(tempMin, temp);
            }
            data[i] = tempMin;
        }
        return data[target];
    }