Ad
  • Custom User Avatar
  • Custom User Avatar

    The description is, by choice, a bit vague on the details. To emphasize that, I added the "figure out the rest from the given test cases" part.

    Personally, I enjoy solving problems where the test cases are leading my way. Especially if they're leading me away from my original attempt at a solution. I don't think I'm the only one, so I won't change the description.

    That being said, your example is interesting. I normally answer the "unclear description" questions with "try to arrange the three strings above each other as shown in the description." However, in your case, this is fully possible. Also, there is no explicit test case for this setup. (I wish it was possible to add test cases after the kata is published.)

    As a reward for the interesting example, I will tell you (and everyone who happens upon this comment) that each character in the parts must be used exactly once. (Which would render your example false.)

    Thank you for the feedback and for showing me a few test cases that should have been there! :-)

  • Default User Avatar

    I feel the instructions need some clarification.

    What should be the bahavior when parts 1 and 2 contain duplicate patterns but s contains that pattern once?
    e.g.
    part1 = 'ap';
    part2 = 'ple';
    s = 'aple';