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.
Thanks yourself! My solution could use a lot of improvement; I'm just getting back into codewars and programming puzzles.
Streams can be very effective. I'd say they are mandatory knowledge for Java devs.
And to clarify my OP regarding
Character.getNumericValue()
, I like it because it's very explicit that you're retrieving a number value rather than implicitly converting from char to int withString.charAt()
.I kind of like the use of
Character.getNumericValue()
here.This line
.mapToInt(value -> value)
is redundant. Themap()
stage before it already converts the string array to an Integer, so you might as well mapToInt() directly.This comment is hidden because it contains spoiler information about the solution