Ad
  • Custom User Avatar

    Like sw4gyJ said above, it's about choosing the correct "a":

    s:  a a b a a a a b a a -> aabaaaabaa
    a:  a a b           a a -> aabaa
    b:        a a a a b     -> aaaab
    
  • Custom User Avatar

    Some quick answers

    1. If you look at the test cases and their expected answers, you'll see that s can only be empty if both a and b are empty.
    2. The "bananas" test cases are just slightly more complicated versions of the "Codo" problem you describe.
    3. This is the reason that this kata is 5 kyu, and not 6 or 7. I think your comment about "deep search" is in the right direction. If you look at older comments, you'll probably find "recursion" mentioned a few times, too.

    Hope it helps a bit. :-)

  • Custom User Avatar

    Great, it's merged. It was mostly a question if you wanted to do more things before I merged it.

    Thanks for the contribution! :-)

  • Custom User Avatar

    Looks good to me. :-) Do you feel ready with it? In that case I could merge it.

  • Custom User Avatar

    Thanks for your answers. I'll try to find the times to improve the tests as soon as possible.

    I'll take a peek at your Python randomizer as well. :-)

  • Custom User Avatar

    I very much agree that the test cases should be better. The initial fault is mine, of course, mainly because I was new here. However, most of the languages supported are added (and approved) by other people than me.

    This makes it difficult for me to modify all the languages and I have opted to try to keep the test cases similar between languages rather than improving the ones I know.

    But I haven't been very active here for several years. What is your opinion?

    • Should I update the languages I know and leave it like that?
    • Is there somewhere I could ask for help with the languages I am not prepared to spend time with?
    • Does it make this kata bad enough that I should simply unpublish it to remove it?
    • Can I transfer the ownership of this kata to someone who would be intersted in updating and maintaining it?

    Thanks for your interest!

  • Custom User Avatar

    This is one of the most commonly appearing issues for this kata. The reason the description says "figure out the rest from the given test cases" is not me being lazy, it's because I sometimes like to solve katas this way. I have a basic problem that I solve easily, and then I need to refine the solution to solve the complete problem. The step-by-step solution is very satisfying for me.

    I also think this is the way professional programming works a lot of the time. At least for me.

    Judging from how many people succesfully solved the kata, I am still of the opinion that it's not too cryptic and that the current description is sufficient for a 5 kyu kata.

    I will mark this issue as being resolved, because it looks like this by design.

    All that being said, I welcome your opinion and if you have a good reason for me updating the description, please share and I'll think about it. :-)

  • Custom User Avatar

    It isn't supposed to be True. However, I can't recreate the problem. I've run the Python test cases 20 times now, and they seem to be doing fine.

    If this keeps happening to you, could you share your code with me and I'll give it another go?

  • Custom User Avatar

    I just looked through the C# translation, I assume you're speaking about the randomness of the result?

    The actual indata looks random to me, but the result could be easy to guess.

  • Custom User Avatar

    I have rejected it. The SadPath2 is correct as it is. The order of the characters is relevant.

    That being said, I appreciate that you spent the time to improve the kata.

    I welcome help with the different languages. Most of the translations are written and approved by other people. :-)

  • Custom User Avatar

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

  • Custom User Avatar

    Thanks for your code.

    If you want to see the test cases, you can do that after finishing or forfeiting the kata. :-)

    I tried out your code and I couldn't recreated the problems with the test cases.

    That being said, your code does not completely solve the task. As a hint, try merging "ab" and "bc" to "abcb". It should work.

    (Also, as a side note, if you want to use Java in a bigger context, the convention is that local variables start with a lower-case letter, e.g. mergeWord. It doesn't make any technical difference, so if you're just doing it for fun, you can disregard this. :-) )

  • Custom User Avatar

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

  • Custom User Avatar

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

  • Custom User Avatar

    I think you missed the following sentence in the description:

    "The restriction is that the characters in part1 and part2 should be in the same order as in s, " so having the last two characters in "wasr" switched makes it fail.

    That said, there probably should be more tests verifying this.

    Thanks for raising the question.

  • Loading more items...