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.
Is it truely the best way to try all possibilities (except you prune lower intermediate results with both identical locations on the board and identical die configurations)?
I would have thought that the best solution would be to find some trick, like using statistics instead of a monte carlo solution to answer the question, "how often is 7 rolled using 2 fair 6-sided dice?".
P.S. I thought it amusing that the size of the array (although not all nodes are used) to contain all possible dice positions on a 60 by 60 board (60*60*6*4) is the same as the number of seconds in a day.
Cookie support is required to access HackerRank
Seems like cookies are disabled on this browser, please enable them to open this website
Dice Path
You are viewing a single comment's thread. Return to all comments →
Is it truely the best way to try all possibilities (except you prune lower intermediate results with both identical locations on the board and identical die configurations)?
I would have thought that the best solution would be to find some trick, like using statistics instead of a monte carlo solution to answer the question, "how often is 7 rolled using 2 fair 6-sided dice?".
P.S. I thought it amusing that the size of the array (although not all nodes are used) to contain all possible dice positions on a 60 by 60 board (60*60*6*4) is the same as the number of seconds in a day.