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.
Because when you access
inputString[0]
you get the unicode value of the first character so what he does is to substract the value of the character 0, because let's say "0" has a value of 32, then, 1 has a value of 33, and so on. So, when you substract 33 - 32 you get 1This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
The mender role typically involves:
What's a 'mender' @dfhwze?
As noted below this is a regular graph reachability problem with no real performance requirements, and there're already many such katas available.
This is not the right way to explain a task.
What if i wanna return the same input?
This comment is hidden because it contains spoiler information about the solution
The description obfuscates this, but it turns out this is just a generic graph search kata like countless before it.
If the point of it is to enforce solving with a specific, efficient algorithm, then the performance tests need to be much much stricter. As it stands, a standard BFS implementation solves this in ~5s.
That's exactly why we should translate the easy kata's to as much languages as possible :)
I can relate strongly. Codewars is great for learning new languages. And the trivial katas are perfekt to take a sneek peek into a random language. Solved at least one on with my phone. No keyboard or IDE needed. Installing a full IDE with testframework and all often takes a lot longer than doing a easy kata.
I'm not a beginner programmer, but I am learning Python, so seeing the different solutions to simple kata like this is actually quite helpful. I also love creative and humorous solutions, so nice job!!
Fancy!
Loading more items...