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.
This comment is hidden because it contains spoiler information about the solution
Could you explain how does it work? Why two pluses in reduce?
drodger, Thx.
PavlovNikita,
This is only a 'clever' way to solve it and not either the only way to solve it or the most readable way to solve it. I personally prefer longer code when it is more easily readable. However, sometimes, it is efficient to do it in a single-line/shorter-code.
After joining codewars, I have tried to be terse with code to learn terseness. So, now, I try to balance both as ultimately code needs to be read and re-read and maintained.
Thx
Hi, where can I read about this method? nice one.
not sure but i think these cool stuff are called functional programming.
https://www.geeksforgeeks.org/functional-programming-in-java-with-examples/
Could you explain how this works and where can read about such methods?
This comment is hidden because it contains spoiler information about the solution
Oh, why didn't I guess this way... )
Where did you get this method?
Can you name it?
I am trying to solve using Swift. Sample run works and I complete all the tests required but when I attempt something wrong..