Ad
  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    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.

  • Custom User Avatar

    Ah, I really like this, very good!

  • Custom User Avatar

    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.