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.
Less optimal with larger numbers, but a very clean solution.
This does not enforce the requirement that s is built from characters drawn from part1 or part2, in the order in which they occur. 's' must be found AFTER 'r'!
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.
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. :-)
The "random tests" in C# are not random at all.
You are misunderstanding the task, your proposed changes in tests and solution are completely wrong. Unpublish your fork, otherwise a moderator should reject it (the author's been active recently).
This test is wrong in the C# fork:
public void SadPath2()
{
Assert.IsFalse(StringMerger.isMerge("codewars", "code", "wasr"), "codewars can't be created from code and wasr");
}
I have updated the test and code to fully run with the correct test. Needs approving
This test is wrong in the C# fork:
public void SadPath2()
{
Assert.IsFalse(StringMerger.isMerge("codewars", "code", "wasr"), "codewars can't be created from code and wasr");
}
Updated the test and code to fully run with the correct test. Needs approving
well done.