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.
Very similar to mine, except I prefer only to use arrow functions for super simple one-liner functions.
Love this. One line, easy to read, and probably more efficient than most of the others.
This won't work correctly on arrays with only negative values (it returns
-1
on[-1,-1]
for example)This comment is hidden because it contains spoiler information about the solution
Nice and simple. I'd prefer a
for_each
instead of the loop, though.