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.
You only need to iterate the array once to get your result. Observe and analyze how
step
can help in this regard.This comment is hidden because it contains spoiler information about the solution
oh! Thank you. lol I need more coffee
I know, but that's wrong,
num
is a number.I'm trying to define i as the index of the number in each array and num[i+1] is the next number over.
Thanks for looking at this
Fix.
What is
num[i+1]
?This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
It was a problem with your code. Not a kata issue.
You're probably parsing the number and that fails because they're too big. Try another way.
Expected: '[9, 2, 2, 3, 3, 7, 2, 0, 3, 6, 8, 5, 4, 7, 7, 5, 8, 0, 8]', instead got: '[9, 2, 2, 3, 3, 7, 2, 0, 3, 6, 8, 5, 4, 7, 7, 6, 0, 0, 0]'
Expected: '[9, 2, 2, 3, 3, 7, 2, 0, 3, 6, 8, 5, 4, 7, 7, 5, 8, 0, 7, 5, 3, 2, 6, 7, 8, 4, 2, 4, 2, 6, 7, 8, 7, 4, 5, 2, 2]', instead got: '[9, NaN, 2, 2, 3, 3, 7, 2, 0, 3, 6, 8, 5, 4, 7, 7, 6, NaN, NaN, 3, 6]'
i'm passing all other test specs
This comment is hidden because it contains spoiler information about the solution
Loading more items...