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.
No, by entire array I meant that if the array has length n, his code runs through 2n elements on average.
I presume you took the time results provided by the test cases which deviate in general, that way the claim can be made either way. If you just run both versions in a properly timed environment you get mine to be about 3x faster, regardless of whether they lists are fully randomized or worst case samples.
In short, importing the sqrt certainly doesn't benefit from being in the function. :P
you wouldn't import inside a function.
you can elaborate on that using the discussions thread instead of writing the code :D
just loop over it without using a comp .-.
golfing works here but you can't use len() for every single iteration..
cheap
regex and still chaotic, ugh.
cheat :P
This comment is hidden because it contains spoiler information about the solution
cheap
nice, there also is a way to apply a formula without the need to iterate n times.
If you perceive each list of Ones/Zeros as a binary number and divide any number Rule30(...,n)/Rule30(...,n-1), then you'll see the pattern.
ofc it's slow, he traverses the entire array ~2 times even though he only needs to do once. Or rather less than once
really slow
kind of slow tho :c
Loading more items...