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
I'm new at this but I've been told the goal is to write code that legible to others. The idea being you'll (theoreticly) be working with other programers and they'll need to be able to follow your code and tell whats happening. That said, is it bad form? No clue. But I do think that the original answer by marutiborker is more easily followed than the long one-liner format.
Thanks for taking the time to answer!
What is this called / what do I google to learn this style of coding? It's beautiful!
Hey, quick question:
Why is i = 1?
I assume we set the iteration to start at the #1 index and by checking str [i - 1] it checks index #0.
Then the loop moves through the rest of the word. I guess I'm wondering why we can't start at 0 and use [i+1] instead?
This comment is hidden because it contains spoiler information about the solution
Woah!!! I realize this is a few years old but good god this is impressive. I'm pretty new to this so most the solutions I find are... clunky. It's super rad to see something like this is possible! Someone called this Regex and you'd better believe I'll be spending some time learning how that works. Thanks for this!