Following is my answer. It got an TLE for input [3,33,333] 10000. However, I find the thought of my answer is similar to My 3ms Java DP solution except mine is in a recursive style. Could any one help me figure what is the problem of my answer? Thank you guys so much.

```
public class Solution {
public int combinationSum4(int[] nums, int target) {
if (nums.length == 0 || nums == null) {
return 0;
}
int[] numOfComb = new int[target + 1];
numOfComb[0] = 1;
for (int i = 1; i < target + 1; i++) {
numOfComb[i] = 0;
}
int result = countComb(nums, target, numOfComb);
return result;
}
private int countComb(int[] nums, int target, int[] numOfComb) {
if (numOfComb[target] != 0) {
return numOfComb[target];
}
for (int i = 0; i < nums.length; i++) {
if (target >= nums[i]) {
int nextTarget = target - nums[i];
numOfComb[target] += countComb(nums, nextTarget, numOfComb);
}
}
return numOfComb[target];
}
}
```