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.
sufficient imo, or at least in an acceptable state now
^That was approved by someone.
Leaving this open since I'm not sure if that is sufficient or I need to go further.
Approved by someone.
approved
Python fork
Approximately halves the amount of time needed to generate all the random tests. Leaves test parameters and author solution unmodified. I also removed the redunant
[::]
on all the inputs passed to the user, strings are immutable in Python.Fork fixing the slow Python test case generation
Runtime for author solution is down to 6.5s from 11.5s.
Most of the runtime is spent generating the tests, not running the refsol.
The most naive optimisation possible (switching to using
random.choices
instead of repeated calls torandom.choice
) halves the runtime of the kata with refsol + authorsol.Awesome Kata! I popped in back on Codewars after a long while and such performance challenge was exactly what I needed :) Thought it will be done in couple minutes, took a bit longer :D I agree with other comment that it would be good to mention in description performance will be important to pass random tests.
So that's what that meant.. Nice one! :)
The deck is preloaded.
I get how this should work in priniciple, but how is it passing any tests with only this portion of code? Where is it getting the "deck" from ?
Thanks for answer, its really help me understand. Never thought about that solution. Its really great.
How it works ? i dont understand :(
It worked just fine for me. Read this: https://github.com/codewars/codewars.com/wiki/Troubleshooting-your-solution
Running into the same issue. Run the "failed" random tests in a seperate IDE and works fine
Loading more items...