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
The problem is described as taking an array, but in Java it actually takes a List/ArrayList. Can you change the problem or the description so its consistent?
Thanks!
This comment is hidden because it contains spoiler information about the solution
Dude, cramping everything together on one line with single character names doesn't automatically make your code clever.
This comment is hidden because it contains spoiler information about the solution
Nowhere does it say that you may not modify the input, e.g. adding properties. Also, the error messages you get give you no hint whatsoever that you are not allowed to modify the input.
That said, I solved it by adding a flag prop to the nodes, ad then doing a second sweep to remove the flags. So there's also nothing that keeps you from modifying it, as long as you put it back.
Not a bad problem, but it's way too easy for 3kyu. The only difficult thing about it is figuring out that you have to leave the input as it was.