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.
It's also got best practice votes so I interpret it as "a good combination of being maintainable and efficient but not something you would expect to see in production code."
Ali, the only notable aspect of this answer is it's verbosity. It's not clever...
check here please: https://docs.codewars.com/getting-started/solutions/#clever
Clever doesn't necessarily mean best practices. I once saw a solution that was worded in the longest way possible (like, absurdly long) and it got clever because most people got a laugh out of it, lol.
Your solution is quite a bit slower than this one actually ;)
Benchmarking on the same input, this solution provides:
Ops/s: 5,122,611
Yours is:
Ops/s: 740,402
While this behaviour is indeed an artifact of the testing system, it is also so easily accidentally stumbled upon that I would still consider the kata to be broken. It is also very easily fixed by moving the describe and it block from preloaded to the the sample and full tests. ( Fork here which fixes it )
This comment is hidden because it contains spoiler information about the solution
Yea, this kata is quite broken...
This comment is hidden because it contains spoiler information about the solution
Not a kata issue. Closing.
Don't add additional letters or blank lines of code. You were warned that "the size of your solution is limited."
Closing.
Except C++!
It's not an algorithm, but it's still programming, sure. This teaches you the dangers of using vanilla
to_lower
/to_upper
methods. This is something that comes back to bite a lot.Oops, JavaScript.
Not sure why this is getting "clever" votes... This is a very verbose way to do this...
Loading more items...