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.
actuall good solution, good job
nice job!
I am not undistem
Very nice solution!
So good 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
i never knew that reduce can be implemented with 4 parameter function as well! This didnt get to my head, need to search on this
This is very clever! But two questions: 1) how does this take care of the scenario when you don't have subsequent negative numbers? (i.e. [3, -30, 1, -20 ...so on]), and 2) on the same note, with the c <= 0 conditonal, I see that you are trying to take care of the 0 scenario plus the negative number scenario. But.. when if the current is 0 and the next number is a positive one? Would that mess up the computation since you need to do p[0] += 1, not p[1] += c? Hope I'm making sense here.
This is harmony
really neat
so elegant solution!!!