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.
Rejected, since issue already resolved.
Diff --> this line added to the description.
Passing float instead of integer to a function raises more likely
TypeError
instead ofValueError
.(see for example https://github.com/python/cpython/commit/f066bd94b9225a5a3c4ade5fc3ff81e3c49b7b32)
May be more interesting to switch to
TypeError
instead.I don't know... The best solution, of course... But I think it would be nice to try at least to improve your skills in creating algorithms. If there a module it's good. But sometimes there isnt
The code is nearly identical:
Sir, you are nitpicking here :'-)
HATE RETURN
This comment is hidden because it contains spoiler information about the solution
Code golf version
Edit: 126 characters
You are not going to spoil that much with an example yielding 2 or 3, especially due to the meeting difficulty being linked to nested brackets.
This comment is hidden because it contains spoiler information about the solution
Recursion limit is 1000 by default in Python.
Given this limit, in worst situation, this solution can generate numbers up to (1000 - 3) // 6 - 1 = 165 bits.
However Python has also an undocumented limit on nested parentheses when trying to
eval
a string which is 200 only.Seems like it has been solved by a mathematician <3. Sophisticated solution.
This comment is hidden because it contains spoiler information about the solution
Not all kata are designed for interview.
If you expect all solutions to be prod-ready, you are not on the right website.
Here is a suggestion to learn from this solution: you should ask for explanations politely.
It may bring you more insights than complaining.
This comment is hidden because it contains spoiler information about the solution
Slower but less memory
Loading more items...