1. Computer Science Engineering (CSE)
  2. Design and Analysis of Algorithms
  3. You are given n dice each having f faces...
Q.

You are given n dice each having f faces. You have to find the number of ways in which a sum of S can be achieved. This is the dice throw problem. Which of the following methods can be used to solve the dice throw problem?

A. brute force
B. recursion
C. dynamic programming
D. brute force, recursion and dynamic programming
Answer» D. brute force, recursion and dynamic programming
Explanation: brute force, recursion and dynamic programming can be used to solve the dice throw problem.

Discussion