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.
Sounds good, thanks for bringing this to my attention.
Made a fix so it should work now. Can you try?
The Description seems pretty clear about what the goal is -- find when the first zombie breaks the defenses or
null
if they don't.It's a flawed assumption that a clear board with zombies still in queue equates to a finished state; if there are still zombies in queue, then it's possible they can still breach the defense.
As for adding an extra test case, maybe if it was early on when the kata had fewer completions, but at this point adding the suggested fixed test means adding it to all the languages and there's some overhead for doing so. But if these types of tests show up in the random tests, maybe that's just good enough.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
As I know all correct input data have only one possible solution.
As for 1010 question is where to take input sample for 1010?
Thorowing, you didn't see my "solution" yet :)
I don't see any iteration to put the elements into the stream. This solution seems fine to me.
Try this:
You'll get a
NullPointerException
because no copy of the array is created.This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
Hi wolffy! ;)
Yeah, thx for the hints. I'm still learning about streams... ;) (Did you begin your chemistry homework? ;o )
cheers!
Don't forget to mark spoilers.
added
Ok, but that shouldn't be necessary: it's bad practice to mutate the input unless "authorisation" is granted. ;)
Note: in which part of the tests did you encounter that problem, please?
Nice hint, didn't know about that method. Thanks! Btw, using regular expressions for this task might be considered overkill anyway. But I must admit that this solution is very concise.
Loading more items...