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.
From Python 3.7 dictionaries are ordered.
Should be fixed
OP solved it, closing
Yes it is, it is quite an ineffective solution.
It's a built-in function
I think we got lost in the elegance, including the kata creator who gave this as the canonical solution, but not for his C++ solution. It seems that the edge case of "not cut" isn't important in the python version.
This comment is hidden because it contains spoiler information about the solution
Isn't there the discussion part already? If there's a question the solver wants to ask, they can ask from there. Otherwise why would anyone need comments for the solutions. It would definitely be less of a burden.
Read the description again, that won't happen.
really?
what if there will be a List with values {1, -1, 2, -2, 3, -3, 3}?
Don't be :(, There is always/will be a better/optimal solution :)
Great explanation! Most often, binary hacks look confusing as heck, but they are powerful.
For example, take the prime sieves here.
You can go from half of a sieve
primes1
to third of a sieveprimes2
without a lot of difficulties by usingk=3*i+1|1 for i in range(1,int(n**0.5)//3+1)
- which is an elegant way to produces the 2-4 wheel (alternating between gaps of 2 and 4).This comment is hidden because it contains spoiler information about the solution
Of course, here the task concerns only the date and not the time of birth.
Bad tip.
Loading more items...