Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
k
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! :-)
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';