Dice Throw Leetcode Algorithm