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.
It is indeed a good solution, but it's important to note that it overflows faster, causing us to lose almost 1/3 of the possible values
Yesn't,
Char
is an instance ofOrd
where the characters are ordered by their unicode codepoint. It does not really "threat them as they were numbers" but deep down at some point everything is an int eventually.wait, Haskell treats chars the same way as if they were numbers? like, he automatically converts char to number like ord() in python?
A lot of us using unnecessary computing power before remembering that this little formula existed, this is why maths are important!
omg I'm not sure I could have figured that out....
let me try for a larger number, like 12.
Wow, I feel dumb after seeing some of these solutions :D
The description clearly says:
And that's exactly why you do use the pair
unique_products
andproducer
in the result!Yes, you're right! It was a typo, I meant O(1) :)
O(1), unless you mean n as the number of bits in the inputs :)
Super clever! Using a formula to achieve O(n) solution is awesome!
Welp, for me tests say 7 should equal 3. :| Python
Kacpers hint is the key ;-)
Yes that makes sense now. There is a bijective relationship between those jars and combination of people who glow.
Waiting for the effect takes 30 minutes. Taking a pill takes no time.
It doesn't make sense for me. He has 35 minutes, so why he can take four pills?
Loading more items...