public int version2(int score[],int total){
        int T[] = new int[total+1];
        T[0] = 1;
        for(int i=1; i <= total ; i++){
            for(int j=0; j < score.length; j++){
                if(score[j] <= i){
                    T[i] += T[i-score[j]];
                }
            }
        }
        return T[total];
    }
Finding the number of ways a given score could be reached for a game with 3 different ways of scoring (e.g. 3, 5 and 10 points).
test case
what happens if total can't be formed with given values
what if numbers are 0 or negative
src/com/interview/dynamic/NumberOfWaysToScorePoints.java