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
jajajaja good
spoiler flag... (messages are visible to anyone from their dashboard)
This comment is hidden because it contains spoiler information about the solution
it's not a performance-wise solution
@BitemNet: use 3 opening backticks with the python language name like this:
then put in the content (which will look like it's in a Python editor)
and finally follow this with another line having only 3 closing backticks
yes, it's totally wrong. I'm currently updating the kata...
I took the sample tests very literally and gave a solution for this erroneous case as well.
Your answer suggests that it was enough to skip the sample tests, right?
holy... This test is just totally wrong... (showing up only in the sample tests)
Thanks ;) How did you do that?
But can anyone explain how this solution passed this test instance?
I had exactly the same solution and it failed on this case:
Thank you 🙂 The "IntStream.iterare(int seed, IntUnaryOperator operator)" returns an infinite sequential ordered IntStream produced by iterative application of the provided IntUnaryOperator. The seed is the initial element of the iteration.
So basically, it created an infinite stream, starting with the seed, using the IntUnaryOperator operation (+1,-5,etc.) on each element i, to create this infinite sequential stream. The limit is to cancel the 'infinite' part, otherwise it'd be an infinite loop. Then it gets converted to an array.
This is a cool, solution. I am guessing i becomes n, and the iterate method returns the iterator, so it runs once and then adds the number to the array?
This comment is hidden because it contains spoiler information about the solution
Loading more items...