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.
I get this random test (2, 1, [0,-1,2,2,2,2,1,2,1,2]) expected 13, which weirdly the result of sum all elements in t. Cuz if we ignore -1, the result should be 10 right?
Maybe just my code haha.
Can I ask what to do if t[i] < 0 ? Couldn't figure it out.
Thanks in advance.
I have the same problem. In case you haven't figure it out, you have to pass the inital number in to the array.
Cheers.
Oh I see, thanks a lot.
This comment is hidden because it contains spoiler information about the solution
Anyone like me, hard code this haha. I even put the data in Excel to alter it
This comment is hidden because it contains spoiler information about the solution