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.
You can forfeit the kata and see other solutions as well as the full code of the kata.
To help you along a bit, the basic problem is to decide whether it is possible to write the three strings on top of each other as in the description. On top of that there are some more precise requirements added by the unit tests, e.g. if you need to use all characters in all strings, etc.
When it comes to the empty string tests, there is no special handling required, so there are no special instructions for that case. For example, you can merge an empty string (
""
) and"apple"
to form"apple"
, soisMerge("apple", "", "apple")
should returntrue
. Since you are required to use all the characters (sorry for the spoiler)isMerge("", "a", "b")
must returnfalse
. With that in mind, what shouldisMerge("", "", "")
return?The Banana test is what makes this kata worth 5 kyu instead of 7. :-)
If you get stuck. Print out the parameters and try to arrange the strings on top of each other on paper, then try to figure out why your code can't. Or ask again. I'll try to nudge you in the right direction. :-)
Thanks for the feedback and good luck!