Ad
  • Default User Avatar

    I originally had other plans and then didn't want to rewrite everything, since it works.

  • Default User Avatar

    Having a digit is a requirement for a number. "[...] digits and [...]"
    As far as this Kata goes none of your suggestions count as numbers.

    Defining what is and what is not a number can get rather tricky. Please try to use the common sense a grade schooler would use to evaluate this question.

  • Default User Avatar

    testing(number,[smallestnumber], indexBefore, indexAfter)
    Move the digit on the smallest index.

    Maybe this helps. You do not swap, you move one digit to another place.

  • Default User Avatar

    C++ seems to have problems with rounding. It only worked with one exact equation, other variations had my solution be off by 1 compared to the expected result.

  • Default User Avatar

    Hitting submit and scrolling down, I see the message "Congratulations, You pass the test![...]". However, I also failed 6 of the 103 tests. Maybe a little too early for congratulations : )

  • Default User Avatar

    JavaScript: Kyu 8 cannot be expected to know how to write their own tests. Please provide some sample tests.

  • Default User Avatar

    The description seems to have a typo.

    { -2, -1, 0, 1, 2 } -> 6
    1. Square numbers greater than zero: { -2, -1, 0, 1, 4 }
    2. Multiply by 3 every third number. { -2, -1, 0(*3), 1, 4 }
    3. Multiply by -1 every fifth number.{ -2, -1, 0, 1, -4 }
    4. Return the sum of the sequence. --> -6, not 6

  • Default User Avatar

    C#: It's interesting to see how many people throw Linq at a problem that can be reduced to a one-liner with Regex.

  • Default User Avatar

    Wouldn't it be actually harder to hardcode the solutions in this case than to just solve the problem?

  • Default User Avatar

    Nice kata. Reminds me to continue my series on kana (https://www.codewars.com/kata/kanakonverter-ii). Maybe later,...

  • Default User Avatar

    Language: C
    I'm suspecting that the hidden test cases are wrong, but can't be sure, since they hide what they expect. For example, I'm getting
    nptuq nmml abi diavjjxwsozq r igldbbi qub wwcfpfprcydau (null)
    Test Crashed
    Exit code: 0
    Signal code: 11.

    Copying this string to the initial test cases produces the same output, when I'm providing a wrong solution, like:
    Test(longest_word, test) { cr_assert_str_eq(longest_word("nptuq nmml abi diavjjxwsozq r igldbbi qub wwcfpfprcydau"), "WRONG");} but it will pass with the correct solution:
    Test(longest_word, test) { cr_assert_str_eq(longest_word("nptuq nmml abi diavjjxwsozq r igldbbi qub wwcfpfprcydau"), "wwcfpfprcydau");}

    It would be nice, if failed tests tell you the solutions they expect. Like:
    Test(longest_word, test1) { cr_assert_str_eq(longest_word("three two one"), "three", "Expected solution: three");}

  • Default User Avatar

    choose a number of 5 positions with no repeated digits

    But under should_pass_all_the_tests_provided I'm getting: Src: 65325, guess: 12436 (In src 5 is repeated) and then: expected: "3 0 helpful" but got: "wrong!",.. why?

  • Default User Avatar

    At least for C#, there aren't actually many similar ones. Searching for "rotate matrix" only yields one comparable result.
    I certainly wouldn't have noticed this as a duplicate and I solved a lot of C#-kata :)

  • Default User Avatar

    C#: In the test cases "expected" and "but was" are the wrong way around.

  • Default User Avatar

    This is really confusing. For SQL Server it's exactly the other way around:

    LOG ( float_expression [, base ] )

    https://docs.microsoft.com/en-us/sql/t-sql/functions/log-transact-sql

  • Loading more items...