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.
One can actually inherit from an inner class. It's a little very wordy, but it should work
Test information is .. sparse. The tests really could use better messages
Please describe what exactly is meant by "rotation" it's not clear from the context and word alone.
Also test-cases don't give nice information about what went wrong.
Oh sorry... I was talking about java
If I don't know what language you're talking about I can't help.
I personally find the index solution somewhat cramped and clunky. I'll need to revisit this later. This can definitely see some improvement on the caching and lazy loading part.
This kata needs an overhaul. test-cases don't check for an incorrect return of 10, and the method shouldn't be named in snake_case....
Well, I'll do that when I have enough time:-)
Thanks for the feedback!
The parameter names could use a little improvement.
The requirement of an empty string should IMO be pronounced a bit more, possibly by adding it to the initial test suite.
Aside from that, very nice challenge
Thanks for your solution! I'll mark this as resolved. :-)
Nice kata! I had very little exposure to Java8 streams API and I learned some interesting things with this one.
Thanks for the feedback!
Before I made this kata, I solved several others that would have been easy without performance constraints. For example, generating Fibonacci numbers is trivial, but to compute the millionth Fibonacci, you have to come up with a much better algorithm.
I thought the problem wouldn't be interesting if I made the tests too easy, but you are right: This kata should be about a useful (and hopefully interesting) application of streams. Performance should be a secondary concern. I disabled the 3 million test. The hardest test now expects 1 million primes. I'm looking forward to your solution!
For the record: The best solution so far can generate over 40 million primes in under 7 seconds on the Codewars server.
Hello There,
I have gotten this kata to pass all test-cases but the last one.
I personally think skipping 3mil. Items in a ORDERED Stream in less than 10 seconds is a too heavy performance requirement :(
Then on the other hand I am not that good at performance intensive Programming.
If the goal of this Kata is primarily to focus on the performance aspect of calculating primes, that's awesome.
If the goal is to properly leverage Streams, then the last test case is too brutal for this kata.
Very interesting Kata, though, thank you