Ad
  • Default User Avatar

    There some not right random tests. For example some not right tests.

    Testing for 6 and 'B8lB888B88Bii'
    ['B8B88B8B', False] should equal ['B8B88B8B', True]

    I count pairs in right answer and theres only 4 pairs. But it returns True. I don't know my code is wrong or i misunderstood task.
    More example. Sorry for my english if i wrote something wrong.

    Testing for 6 and '8BBbBea8eB8BBf8b88B'
    ['8BB88B', False] should equal ['8BB88B', True] There is 3 pairs

    Testing for 7 and 'Bb8BbgmBb8B8geB8BBaicii8B8'
    ['8B8BB88B', False] should equal ['8B8BB88B', True] There is 4 pairs

    I think the some tests answer is not right.

  • Default User Avatar

    In the first sentenced it is explained that x is number of pairs of bears:
    "In order to (...) it has x number of mating pairs of bears."

    However indeed the test is not passed if we count pairs, we need to cont bears instead.

    Therefore, I think it is a mistake in the kata.

  • Default User Avatar

    Ok, fixed.
    I checked that the simple tests pass, and that the full tests pass, and it is OK.
    Still when I publish, thre is a orange messag at the bottom stating that I submitted with failing tests.
    I don't understand the problem.

  • Custom User Avatar

    Scratch point 4, it's not really applicable to most cases here.

    However, sample tests and solution setup are still missing includes for std::string and std::pair.

  • Default User Avatar

    I made most of the changes you suggested, but I could not resolve the 4th point, changing the make_pair to initializers.
    the reason is that Equals cannot resolve ty type from initialization list to properly typed pair.
    Do you have a simple way to do it ? I think I probably overlooked something.

  • Default User Avatar

    Approved, thanks. I don't know C++ so happy for people to edit.

  • Custom User Avatar

    Python.
    I tried the couples at first but some random tests were failing... even more confusing since the basic tests work for both couples and total bears :)

  • Custom User Avatar

    JS expects amount of pairs, not bears. Which language you have this issue with?

  • Custom User Avatar

    I think there is a problem in the definition:

    "Return an array containing a string of only the mating pairs available
    [...]
    and true if the number is more than or equal to x, false if not"

    THE number is vague and does not refer to anything. I find this particularly confusing because it would be intuitive to count the number of couples (as if it said "their number", referring to mating pairs), but the solution requires the total number of bears which are mating instead.
    Confusing.

  • Default User Avatar

    Thank you !
    I will will make the modifications.

  • Default User Avatar

    Ok! Thanks 👍🏻

  • Custom User Avatar
    • almost all snippets are missing includes for std::string and std::pair
    • missing header for stringstream
    • placeholder name any_group_name_you_want in test suite
    • it would be nice to have edge cases for "B", "8", and "" - I imagine many solutions can fail them with out-of-bounds access
    • many calls to std::make_pair(str, n) can be replaced with shorter initialization list {str, n} (uh, okay, maybe not that many, but still)
    • kudos for using a proper stringizer!
  • Custom User Avatar

    Bears must be together in male/female pairs 'B8' or '8B'

    '8j8mBliB8gimjB8B8jlB
            B8    B8B8
    

    They must be together in the string, you can't make the pairs yourself.

  • Default User Avatar

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

  • Default User Avatar
  • Loading more items...