Closed mnemonikr closed 1 year ago
The existing checks failed for 2 < 1 and 4 < 3 (returning true in both cases). A missing equality check was the root cause, but restructuring the code into a recursive call made the correctness more clear. Confirmed with stronger unit tests.
2 < 1
4 < 3
true
The existing checks failed for
2 < 1
and4 < 3
(returningtrue
in both cases). A missing equality check was the root cause, but restructuring the code into a recursive call made the correctness more clear. Confirmed with stronger unit tests.