Ad
  • Custom User Avatar

    I am not sure what you're trying to suggest...

  • Default User Avatar

    I hate author :с

  • Default User Avatar

    The JavaScript instructions have an issue. It states that the input is a string, yet for two tests a boolean is provided. Removing the booleans or changing the instructions to say the input can be either a string or a boolean would fix the issue.

  • Custom User Avatar

    The usual wording in math problems like this would be "non-negative". The description could either make an exception for 0, or just change "positive" to "non-negative" and give a clear example.

  • Custom User Avatar

    0 is neither positive or negative, so...

  • Default User Avatar

    0 just can't be positive in standard math, so it has to be reworded somehow instead.

  • Custom User Avatar
  • Default User Avatar

    Is a trivial solution that only some number of engineers know about on a difficulty rating 7 problem a bad thing? What percentage of the engineers who are familiar with the implimentation of that solution do you think would have difficulty solving the problem without using that solution?

    Wouldn't there be a case made for a more challenging version of the problem where the trivial solution wasn't possible (and more context within the instructions to clarify differences between thw two)?

  • Default User Avatar

    Respectfully, begging your pardon, but derived how? You are given a function declared to return an int, you are passed an int array, and all array test values are cast as int. Granted, I see my solution makes use of size_t where I probably should've used int; so does that make a difference in how one might solve the kata? Thanks.

  • Default User Avatar

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

  • Custom User Avatar

    Just remove or comment the sample test case. It's hidden under the sample tests at the bottom.

  • Default User Avatar

    JavaScript version. My code works fine in Atom. When I run the sample tests here I get this failure:

    Test Results:
    Solution
    should test for something
    This is just an example of how you can write your own TDD tests - Expected: 'expected', instead got: 'actual'

    Is there a mystery direction that requires I also write some tests for this!?

    When I submit my code it works fine. The error only exists for the sample tests.