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.
Thankyou for helping me out. As a beginner these nudges to the right direction help a lot.
Congratulations to the 200th post for this kata. :-)
If you changed that
if
, you probably got the wrong answer on the lastif
instead. NeitherremString
norremString2
will change from their initial values.(Btw. That last if-statement will result in a a false negative for
isMerge("aaaa", "aa", "aa")
as well, so you might need to rethink your strategy.)I did try that earlier and it did not work, just to see if it works i changed the if, so basically it expects false for all of them except the last 0 + 0 = 0 case
Well, an empty string can absolutely be the merge of two empty strings. Just like 0 + 0 = 0. I haven't gone through the whole code, but the first
if
-statement looks suspicious.Good luck! :-)
This comment is hidden because it contains spoiler information about the solution