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.
Thing is you should be aware if you CAN or CAN'T change the original array. As a good practice we always copy the original to another before doing any changes, but there will always be situations where you don't need to do that.
Why prev? Wouldn't that imply the first argument is the previous item of the array? I like acc (for accumulator) and v or e (value or element) or something. (Although I'm guilty of using a and b for a quick one)
This comment is hidden because it contains spoiler information about the solution
Ok, thanks.
Use spoiler flag please.
This comment is hidden because it contains spoiler information about the solution
I like it, but why we are using names of varible as "t" and "n" ? Maybe it's better to use names as "prev" and "current" ?