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.
This comment is hidden because it contains spoiler information about the solution
can someone explain it?
One of the best!
Is modifying the input really best practice?
Very readable and logical. Oh, this language design...
Super easy to read!
that's a very good question...
._.
What is being repeated that shouldn't be in this solution?
have you used
timeit
to compare the performance of yourCounter()
solution with this one? I personally believe that your solution could be 10X slower.Repeating code doesnt automatically ruin a solution. In this case it is actually very readable and writing this in another way would make it unclear for no reason
How could this be "best practices"? 0_o
Time complexity is O(n^2), would not consider it as 'best practices' while there are more optimal solutions (e.g. see Counter).
But useless
=~)
ok i'm not the only one, I thought of this first and was like nope thats O(n)...
this is the way
Loading more items...