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.
Did you bench it. It looks that hashset is not required or is slower that this solution. Probable because L3 cache
Better constant time factor or caching maybe?
Elegant solve. Thanks for the commented version -- most insightful.
This comment is hidden because it contains spoiler information about the solution
Still a pure function because in order for it to be impure , it would have to access variables OUTSIDE of the function call...this function would always output the exact same thing if given the same input because there is no outside state effecting what happens inside the function...
not really, what if you have a program of O(1)?
(a.pop()|0) + (b.pop()|0)
works (same effect as doing~~
)Although you can compress a range, the enumeration is faster.
Run it through the naive implementation, get back to me when that has come up with an answer ..
I like your solution, just use strings.Builder instead concatenaning strings
The kata is OK, the test is not extreme
Did that Ruby
undef require
solve Blind's issue? I see invalid solutions that use it; it certainly seems so ( thanks! ).Is that a Python problem, or just plain a CW problem? The DP solutions I see should be able to run within a reasonabe amount of time; it really doesn't look like the algorithms are that bad.
I tried to create a Python translation, but a Ruby 1.2s solution, in Python, with a lot less tests, runs in 10s. terrible.
it would, since most of the solutions to yours are actually solutions to a "ludicrous" one
Loading more items...