Ad
  • Custom User Avatar

    I fixed it in a new fork, though maintaining the right order Expect(expected).To(Equal(actual)) in the tests (otherwise the message seems contradictory, at least it's how all katas tests are set).

  • Custom User Avatar

    The expected and actual were switched in the test, so although the test cases worked ok, the test output looked awkward.

  • Custom User Avatar

    Will be nice to use generics when 1.18 is supported.

  • Custom User Avatar

    @Joel according to the rules, new words are defined as starting after any space, comma, exclamation point or period. Additionally, there can be multiple spaces between words, and if so, the number of spaces should be preserved.

  • Custom User Avatar

    I like the overall solution, but I don't like how it converts the alphabet to uppercase so many times. Assign it as a var?

  • Custom User Avatar

    This is a great translation! I'd approve this, if I could.

  • Custom User Avatar

    https://www.w3schools.com/css/css_pseudo_elements.asp
    Note: As a rule, double colons (::) should be used instead of a single colon (:). This distinguishes pseudo-classes from pseudo-elements. However, since this distinction was not present in older versions of the W3C spec, most browsers support both syntaxes for the original pseudo-elements.

  • Custom User Avatar

    Although my comment above focuses on the negative, personally, I think that this is a good kata because it gives a real-world situation for doing the dot product. There are many ways to do a dot product, so it gives us practice thinking about it.

    As it is, some people are challenged not by the underlying problem itself, but by the description of the problem. I like that example, @Chrono79, and think that it could strengthen the description.

    Alternately, you could just write it out in words.

    [0 0 0 0 0 1] means that Good has one Wizard. One Wizard is worth 10, so Good's total army is worth 10. [0 0 0 1 1 1 0] for Evil means that there is 1 Goblin, 1 Uruk Hai and 1 Troll. A Goblin is worth 2, Uruk Hai 3 and a Troll is 5, so Evil's army is worth 10. The result of this battle is a tie!
  • Custom User Avatar

    Each race has a certain worth when battling against others.

    That should cover the common error, but if a test was added in the sample tests it would be fine by me. Or adding this example to the description:

         Good                                       Evil
    
     0 0 0 0 0 1                   /            0 0 0 1 1 1 0
        Wizard                     /       Goblin + Uruk Hai + Troll
          10                       /         2    +  3       +   5
          10                       /               10                           
    

    10 = 10 therefore it is a draw

  • Custom User Avatar

    Maybe it's just "Evil", not bad!

  • Default User Avatar

    a bad kata!!!

  • Custom User Avatar

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

  • Custom User Avatar

    To be honest, this is the reason I don't recommend codewars. It's got a fairly low quality of kata, and people refuse to use the mechanisms like voting that could lead to better ones. Then they are pedantic when anyone insults the poor quality. We shouldn't waste much time on poor quality systems when there are plenty of better competitors.

    It wasn't 8kyu. You are bringing up irrelevant details?

    Some people think it was stupid. Therefore it is stupid in some ways. It is stupid to say that "it is not stupid at all". The degree of intelligence is not a binary choice.

  • Custom User Avatar

    You first minimize i then minimize j. There is an order to the operation involved. Otherwise why are they listed in an ordered list?

    Also, Have you looked at the dozens of comments from other people is an invalid argument because there are always clueless people who raise bogus issues on even 8kyus that has no problems because they didn't bother reading the descriptions and blame everything as someone else's fault. In fact I can pull several extreme examples immediately:

    https://www.codewars.com/kata/sum-of-digits-slash-digital-root/discuss
    https://www.codewars.com/kata/persistent-bugger/discuss
    https://www.codewars.com/kata/good-vs-evil/discuss

    I don't have problems because I do look at descriptions and when I get failed tests, I review my code and see why I'm wrong (emphasis I, I don't blame the kata for anything unless it's proven to be the kata's fault). If you're blaming the kata and the kata author for everything regardless of their correctness, you're causing more trouble for its worth.

    (Also, no, requiring i to be smallest is not stupid at all because that's the only way to guaranteed the uniqueness of the solution. If you're thinking otherwise you're stupid. Please reflect more on yourself.)

  • Custom User Avatar

    Note that the description also states that j is to be as small as possible. Now, I don't know about you, but in my opinion, 0 is a smaller value for j than 1.

  • Loading more items...