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 guess this solution has a very bad performance, concatane 4 maps and 4 reduces is not a good idea in terms of performance
To easy for 5kyu, I guess is 6 or 7 kyu
It's a nice kata, but I guess is 4kyu level
Ok I found the solution.
Spoiler:
You have to define de length of the array you gone to return when you declare it, it's more efficient.
I guess same Issue in javascript, I'll pass all the test but I get an Execution Timed Out (12000 ms).
Really is necessary to use a so big arrays to test?
I'm only using one loop, I'm not see the way to do it more efficienly :(
Flat and FlatMap doesnt works in codewars?