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.
Many Thanks. I tried returning an empty array earlier, but i might have done a mistake. Now it works. Also thanks for the markdown link :)
In this case, you're returning input (which is
null
). Instead, you should be returning an empty array. The problem in on line 7.By the way, relevant link: markdown formatting
This comment is hidden because it contains spoiler information about the solution
I have to say i am a bit lost here. I try the kata in Java. After some research i found out that there is something called default method. But i still don't know how i should actually start to code it or even how i should use the default in the first place.
Maybe some explanation about the method and how it works might be a good idea?
If you didn't guess. I am pretty much a total beginner.
Thanks, this did the trickt! :)
Just one problem, that solves it all.
In Java, you don't compare strings like that. Use
a[i].equals(l[0])
instead. Not sure why it passes the example tests.That is exactly the problem. That (i think) my solutions are correct, but the random test always failes.
This comment is hidden because it contains spoiler information about the solution
Actually, I see you solved the kata. Hope you enjoyed it! :)
This isn't an issue, as there are 86 Java solves.
I just ran a correct reference solution against that input, and the result definitely should be z.
Please post your code here and mark the post as having spoiler content so we can help. Cheers.
Also, I'll give you a hint in case this has to do with the problem: for fixing the overflow, try using the modulo operator.
This comment is hidden because it contains spoiler information about the solution