Ad
  • Custom User Avatar

    The rules didn't change, you just failed different test cases. The "Expected" is what your code should have returned, but it incorrectly returned the "Actual" values instead.

    I don't know which programming language you are using, but here is an example of a few test cases from the final test.

    Test.assertEquals(highAndLow("1 -1"), "1 -1");
    Test.assertEquals(highAndLow("1 1"), "1 1"); // Second failure.
    Test.assertEquals(highAndLow("-1 -1"), "-1 -1");
    Test.assertEquals(highAndLow("1 -1 0"), "1 -1");
    Test.assertEquals(highAndLow("1 1 0"), "1 0");
    Test.assertEquals(highAndLow("-1 -1 0"), "0 -1"); // First failure.