Maybe your answer is not lexicographically sorted, or you missed a case.
[(C and B) implies A] implies [(C implies B) implies A]
ASCII should be:
Thanks! Found an issue. Dumb one. My code is a bit over complicated, so
I don’t know if this is too picky or not but I would have liked at least 1 test case with multiple violations that way the output could be tested properly.
Do you have an example?
I was thinking about two specific behaviors but I went back and in fairness, they are both discussed in the problem statement so I jumped the gun there.
I was thinking of
- A “not” (’+’) occurring before a branch, which is addressed in the problem statement as:
’ – B
- A multiple line output, which is also addressed at the end of the problem statement.
Its a good problem, I enjoyed doing it, I did have to come to the discussions page to figure out why I was failing a validator and not any test cases was all.
About your second point, I permuted the last couple of test and validator.
About your first point, the A nor B validator starts with a +. I inserted a test and a validator for nor.
A implies B equals ((not A) or B) is correct but it implies one more condition that’s important to account for: A false and B false evaluates to true also. This is the truth table for implies statements:
|B false|B true ----------------------- A false|true |true A true |false |true