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.
This comment is hidden because it contains spoiler information about the solution
Very much so! We should avoid processing unnecessary data, especially when the problem itself points out that the input array might be very large.
Oh, and if you are still not convinced, please tell me which test case you think is wrong and I'll take a look at it.
Thanks again!
You should probably check the test case you failed a bit closer, I can (almost) promise you that they are correct. (1500+ successful solutions.) Note that the description explicitely states that some things you need to figure out from the test cases.
To give you a nudge in the right direction, you could start with a minor adjust for
isMerge('ab', 'ab', 'b')
which should returnfalse
. After that you probably need to rewrite your solution to handleisMerge('banana', 'bana', 'an')
which should returntrue
.Thanks for providing your code, it makes it much easier to answer.
Thanks for taking interest in the kata and good luck! :-)