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.
[2, 0]
or[0, 2]
means one side of the package has a good apple, and the other side is bad.[0, 0]
means both sides of the package are bad, indicating a fully rotten package.thats very weird
you have something like: [1, -1, 6, -6, 5]
the reduce method give the number's sum, in this case it will be 5, and this is the correct answer.
But there is a problem maybe you have something like [1, -1, 6, -6, 5, 5], in this case the sum will be 10, because we have an additional 5, to avoid that, he has removed all the duplicated numbers in the array converting it to Set type
How does it work?
What do they mean by this?
I couldn't either, I went descending order tho, why would that make a difference?
But they are not booleans
This comment is hidden because it contains spoiler information about the solution
This is what I wanted to do but I was puting the recursive function at end which mas making the result string inverted
Nice one!
Nice! I was wondering how to do it with a switch case..