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.
smart either way.
You've responded to a comment from 6 years ago.
I would do that, as it takes excess processing time and memory, and that surely must be avoided to be "the best practice".
no, if int can be in different position than 0
have you used
timeit
to compare the performance of yourCounter()
solution with this one? I personally believe that your solution could be 10X slower.overkill
Time complexity is O(n^2), would not consider it as 'best practices' while there are more optimal solutions (e.g. see Counter).
BC stands for bash calculator as far as I know.Bash on its own is not capable of floating point aritmetics. Have I claimed that my sollution was clever or best practice? The point is to solve things using the given language, OP is lucky test container comes witn python interpreter installed. We wouldn’t have this discussion if it wasn’t.
How is using the bc programming language (https://en.wikipedia.org/wiki/Bc_(programming_language) in a shell exercise supposed to be clever/best practice? Why didn't you use pure shell?
How using python in shell excercise is supposed to be clever?
Suposedly smart code, but what is the actual point? What if the input is -lt 0 or a something other than integer?
This comment is hidden because it contains spoiler information about the solution
;)
and JS community is even worse about that x) ;)
The triumph of form over content :) I'm often shocked when looking on the sollutions. Python community will do everything to write the shortest code possible, even if it is completely unreadable and inneficient. I've noticed that I've started doing the same...
It makes no sense to sort the set, dictionaries in python are unordered.
Loading more items...