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
and a nested cycle
This comment is hidden because it contains spoiler information about the solution
Ahhh thanks for reading my solution - let me tell you; my background is in mathematics and I'm teaching myself programming for fun.
I struggle with the "coding"/"computer science" katas on Codewars, and at first I used to "reconsider my life choices" reading the top solutions also, but occasionally there are helpful users who make detailed explanations and I've learnt a lot from reading them.
Therefore, when there's a "mathematics" way to solve a kata I try to return the favour and write a helpful explanation - hopefully it works 2-ways and encourages people with computer science background to learn a little more mathematics, or even just some neat "tricks", and that way everyone learns from each other and makes the site better!