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 was my first attemp but it didn´t pass the negative N...
It´s seems that the test cases changed out of the Kata description scope.
I guess the Kata description changed. N won't be negative.
"You are given an array with positive numbers and a non-negative number N."
Wouldn't you encounter an error if n was out of range before you get to the else part?
Can't give this one best practice as you don't account for n being negative, which it could be as nothing in the description accounts for N not being less than 0 (even though none of the test cases accounted for it)