Ad
  • Custom User Avatar

    Quite readable? The lack of any new lines and multiple returns on one lie is poor form. I wouldn't approve code like this in merge requests.

  • Custom User Avatar

    This is quite readable, if it was a more complicated problem/solution than this approach would be undesirable.

  • Custom User Avatar

    Yea I'm honestly a huge brat when it comes to descriptions/directions, I always learned easiest by examples vs. interpreting the written directions (terrible weakness I have, this is probably a learning disability of some kind). So this is my issue. But thanks for the fun Kata!

  • Custom User Avatar

    Thanks for your feedback and being open minded about different preferences. :-)

    I do enjoy different kinds of problems. For kata-like exercises, like practicing TDD, I agree with you. Other times I enjoy starting out on a journey, finding obstacles on the way and working around them. (Which is more like my own day-to-day work.)

    A problem with this kata is probably that it has enough instructions to make it feel like a kata exercises with all requirements given up front. When it isn't I can see your frustration.

    I hear what you say and will try to make it clearer if I ever make another exercise. :-)

  • Custom User Avatar

    Thanks!

  • Custom User Avatar

    I liked this Kata a lot - thank you! Its easy to break down into stages and solve piece by piece.

  • Custom User Avatar

    I like this Kata a lot but the instructions are not great, I HATE when the description of the problem does not include enough information about the parameters/rules of the Kata. I don't think I should have to find what this Kata is actually asking for by failing lots of test cases/hitting submit over and over/console.logging a million times. I read the description and thought all that mattered is that all the letters are included in Part1/Part2, and that they must be in order - I started designing my entire solution around that. Its hard to tell if there are not allowed to be other letters/extra letters, because this is not even mentioned in the description, and there is only ONE example in the description of the Kata(which is super simple). I assumed that I had to check the order first and foremost and that all the letters are there. The instructions are vague, no where in the description does it say there can't be extra/other letters that are not in the 's' argument. I want the rules in the instructions, I don't want to have to hit submit a million times to figure out how to actually solve this because the instructions/my design is not addressing the actual Kata requirements due to lack the rules/necessary parameters.

    Edit: reading through questions section and I saw this was your intention... I find this annoying when working with katas, but I guess you have your own tastes in the nature of problems you like to solve that don't align with mine, and I respect that.

  • Custom User Avatar

    You have a node.setNext method that you didn't even mention in the description of this Kata. This is obviously crucial in solving this.

    No, it's not. setNext is an implementation detail and not a part of the interface. getNext( ) is all you need to solve the kata.

  • Custom User Avatar

    The description explicitly states:

    Note: do NOT mutate the nodes!

    You do not need node.setNext() nor should you use it. The only part of the interface that you need is mentioned in the description: node.next.

    Cheers.

  • Custom User Avatar

    There needs to be more of a description here than just briefly mentioning the two methods added as properties on the 'node' object argument. I have to console log just to clarify everything for myself. You have a node.setNext method that you didn't even mention in the description of this Kata. This is obviously crucial in solving this. Please update the description to include a clear picture of what your passing into the function as an argument.

  • Custom User Avatar

    Guess we need more time complexity...

  • Custom User Avatar

    Clever solution? Of course.
    Best practices? Not at all...

  • Custom User Avatar

    Codewars voters prioritize the shortest line count over readability and efficiency... Always.

  • Custom User Avatar

    Almost twins. This is what I came up with pretty much. Except I summed the zeros count.

  • Custom User Avatar

    This was so cute and sweet I did my own version. I just don't like reducing length of arrays I'm running a for loop over so I switched to a while loop format. Good answer!

  • Loading more items...