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.
The one-liner requirement is stupid.
LINQ is a dream here.
I think a failure on
null
is reasonable. In Java we have to assume that value are notnull
, since the alternative is an excessive number of checks.Optional
exists for the cases where a value may be present or not.This comment is hidden because it contains spoiler information about the solution
Why not just check if the character is in range?
This is a slow solution. Why sort the array when you can just walk it?
The Java version needs this test:
This is due to the Java compiler sharing String instances where possible, resulting in == being sufficient for the tests where .equals should really be used.
Be careful with this one! .equals should be used for string comparison.
This comment is hidden because it contains spoiler information about the solution
Creating a Stack seems over the top!