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.
Your example should absolutely return
false
, but I doubt that the random test cases are wrong. They have been checked a lot of times already.There is a problem with your code, though. And there isn't a specific test case to catch that particular bug. (Wish I could add test cases after the kata was published.) With a bit of (bad?) luck, the random tests won't expose it either.
Try running your code on
isMerge('ananas', 'anas', 'na')
. It should returntrue
.Thanks for your feedback! :-)
Your "random string" test cases often expect true when they should be false. If the same character exists at a given char position in part1 and part2, it expects true, but should be false. I passed by re-submitting a few times until this stopped happening, receiving different numbers of failed tests each time
e.g. s="test;ab", part1="te;a", part2="st;b" - expects true but should be false (at least that's my interperetation of the problem!)