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.
thank you good sir!
Only way to avoid a timeout. What a dumpster-tier kata. Embarrassing for the creator.
what's wrong about this solution and which would be best practice in this case?
This comment is hidden because it contains spoiler information about the solution
so cool
True, but this was probably a really old answer. That's why I think Codewars shouldn't obfuscate dates. I don't know how exactly, but I'm sure there's a way to solve the issue of really outdated answers (that were great at the time) being presented as best practices to beginners especially in JS and Python katas.
there are better, simpler oneliners
i agreed with you
what this
Why people upvote Best Practice for one liners, it is clever but "Best Practice" no way
This comment is hidden because it contains spoiler information about the solution
No, it doesn't.
Here's a profile of running this problem 10 million times with an if/if/if solution versus an if/elif/else solution:
Even if it did, if you care about nanoseconds you shouldn't be choosing different flow control syntax in Python, you should be choosing a different language.
if elif else statement works faster than if if if
Pep8 recomends not to use complex compound statements, like if len(x for x in list) > len (y for y in range(6): return [x for x in list] if A else 0
This is fine i guess
This comment is hidden because it contains spoiler information about the solution
Loading more items...