Ad
  • Custom User Avatar

    At least in java the kata doesn't appear to be broken.
    The second test block (should_test_predefined(ReverseTest)) does not seem to test for a correct string result; it does, however, test for behavior (it tests that the function has been called the correct number of times). So it's a little misleading because you can technically pass this test block with the wrong result but the right behavior.
    However, the first test set (should_tetst_30_randomized(ReverseTest)) tests for both.
    If you follow the instructions and you return the right result, you can pass both blocks and complete the kata.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution

  • Custom User Avatar

    Heavy reliance on array methods (especially reduce) slows this function down, because each "reduce" executes a loop over an array. Once you've calculated the sum to the right and left of the index, you don't actually need to re-calculate ("reduce") the sums on both sides from scratch when you move the index, because the array values are fixed.

  • Custom User Avatar

    This comment is hidden because it contains spoiler information about the solution