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 had to come back to this one after a break today, fairly happy with my solution, but it did involve me writing various outputs out using pen and paper to get all my logic correct. This is a really good one.
I see lot's of clever solution for this one, but I'm still happy with mine. I'm trying to approach these challenges now with the view of what I would like to see if I was looking at production code. What is easy to read and can be consumed by other developers without an explanation. Maybe it's too much and it can certainly be made smarter, but I hope that everyone of all levels can follow this.
Added a couple of optimisations for performance, and now I can see everyone else solution. Mine is quite cumbersome! I still think this is a great kata.
I've had another go. I've ended up with a function to compact the array and I call that 5+ times. This passes for all test except the large random tests and it looks like I'm losing some accuracy. I can increase the number of times I compact the array, but then this will time out! I feel like I'm getting closer to a working solution.
I'm really enjoying this one. I'm currently timing out when dealing with large numbers / ranges, so that needs to be addressed. I'll have a look at it with fresh eyes later. Good challenge.
Ah, I really like this, very good!
I like this solution, short and simple, but llike others I do wonder about the number of loops. Wouldn't be a problem on data sets this kind of size at all.