1.

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 ProgrammingThis question was posed to me in an online interview.Question is taken from Dice Throw Problem in section Dynamic Programming of Data Structures & Algorithms II

Answer»

The CORRECT OPTION is (d) Brute force, RECURSION and Dynamic Programming

The best I can explain: Brute force, Recursion and Dynamic Programming can be used to solve the DICE throw problem.



Discussion

No Comment Found

Related InterviewSolutions