Checking if the probabilit array is correct and calculating the probability of the OR event are two different responsibilities and should be in different functions/methods/kata.
Returning a float as a string is unneccessary, just request a rounded float.
Entire description is pointless waffle about some formula that never gets used.
A non-recursive solution can still pass the tests like this one
In the description, the third call should replace all values of
2
with3
The description needs better formatting as well
JavaScript version needs random test cases
This comment is hidden because it contains spoiler information about the solution
Checking if the probabilit array is correct and calculating the probability of the OR event are two different responsibilities and should be in different functions/methods/kata.
Returning a float as a string is unneccessary, just request a rounded float.