1.

You have n dice each having f faces. What is the number of permutations that can be obtained when you roll the n dice together?(a) n*n*n…f times(b) f*f*f…n times(c) n*n*n…n times(d) f*f*f…f timesThe question was posed to me in my homework.The query is from Dice Throw Problem in chapter Dynamic Programming of Data Structures & Algorithms II

Answer»

Correct answer is (B) f*f*f…N times

The explanation is: Each die can take f values and there are n dice. So, the total NUMBER of permutations is f*f*f…n times.



Discussion

No Comment Found

Related InterviewSolutions