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.
Typos corrected
Please remember to provide details as not all kata authors are native-english speakers
Typo in problem statement.
Does this qualify as "easily?"
signmod = index < 0 ? 1 : 0
(index.abs() < items.length + signmod ) ? items[index] : default_value
ditto, the parentheses are extra but it reads better then the other solutions.
I think I like this approach the most - I went with .map.inject, but this only iterates through the array once.
This comment is hidden because it contains spoiler information about the solution