I call this kind of problem the “find a counterexample” problem (made that up just now). In these kinds of problems you start with the assumption that what you get is true
. Then you proceed with examining your inputs to find just one counterexample. Once you have a counterexample, you now get false
.
Typically, in code this translates to just an if-block, with no matching else block.