Hi!
Assume 5000 test cases of A,B,C,D.. and The probabilities are as
mentioned above.
Then If loop will fail for 75% of test cases and else will be
executed.. In that 75% test cases, only 75% test cases will satisfy
the inner if statement..
So 3/4 * 3/4 = 9/16.
9/16 * 5000 = 2812..
I guess
I think, we must give answers in the range..
See, what happens if the
Test cases which doesn't satisfy (AB) can be the test cases which
satisfy the condition (CD)
In that scenario,
!(AB) and (CD) co-occurs, Ouput will be 3/4 *1 * 5000 = 3750..
o.w, Worst case , 3/4 * 2/3 * 5000 = 2500 ..