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.
python new test framework + random tests are required. updated in this fork
what the fun??? i took more than 30min to solve normally, but u did in list comprehension!!! salute ;-)
Approved J4FC's fork which fixes this issue!
All good ;)
Fork to replace deprecated function
I approved hob's fork, didn't see yours, sry :( ! But the issue above still has not been fixed!
Python tests emit warnings:
Python fork - Test Framework fix & replaced deprecated function
Retired.
Approved by someone.
Fork with Ruby 3.0 - Please approve
approved
D translation
This kata is a subject to deduplication process here: https://github.com/codewars/content-issues/issues/114.
Please join the discussion to help us identify duplicate kata and retire them.
Church
can be an expensive encoding, andmod
is an expensive operation in LC regardless of encoding ( but probably worse inChurch
).Part of programming in LC is optimising at least a bit; I don't usually aim for the same difficulty as original kata because difficulty is all over the map anyway ( there are few really white kata in LC ).
Could you figure out in a kumite how much the random tests would have to be dialed back for a not completely naive solution to pass? If it's 90%, it wouldn't seem like a good idea, but 50% is not unreasonable to scale back. ( Mind you, blindly going from 100 to 50 random tests will also decrease the maximum numbers from 100 to 50, so that'd be an 88% decrease! )
ETA: Note that the reference solution uses an
O(n)
sub
, instead of the usualO(n²)
. That probably makes a big difference already. The reference solution runs the tests in 2.5 seconds, so using a naivesub
is quite possibly never going to work.Also it seems like this
naive solution isnt nearly fast enough in lc while it easily works in other languages (if I didnt make some mistake)
Loading more items...