public static void main(String args[]){
        DiceThrowWays dtw = new DiceThrowWays();
        System.out.println(dtw.numberOfWays(3, 3, 6));
    }
@author Tushar Roy
http://www.geeksforgeeks.org/dice-throw-problem/
This solution assumes that 1,2,1 is different from 2,1,1 which is different from 1,1 2
so total 3 ways are possible
src/com/interview/dynamic/DiceThrowWays.java