We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
The expectations for this puzzle aren't really clear. For a standard pair of six-sided dice, the problem is simple enough that one can work out the math in one's head and hardcode the answer ("5/6" as @kongguibin pointed out). But in a real interview, would one be expected to implement the logic? And would one be expected to make the solution generalizable to m dice with n sides?
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Day 2: Basic Probability Puzzles #1
You are viewing a single comment's thread. Return to all comments →
The expectations for this puzzle aren't really clear. For a standard pair of six-sided dice, the problem is simple enough that one can work out the math in one's head and hardcode the answer (
"5/6"
as @kongguibin pointed out). But in a real interview, would one be expected to implement the logic? And would one be expected to make the solution generalizable tom
dice withn
sides?