I an coding in JAVA.

I can’t get “FIX IT” test, I know that my code is not optimized but I don’t know what. Note that sometime the test is OK but when I submit, it failed at “FIX IT”.

I am using a recursive function to interprete d’n’ (with Pattern/Matcher) in order to extract all possibles outputs (note that I also compute propability simply by dividing by the number n. (Everything work perfectly).

I am using TreeMap in order to automatic sort of output values.

What have i missed? Any hint in order to optimize my code?


A post was merged into an existing topic: Dice Probability Calculator puzzle discussion