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.
I'm having a very strange issue with this one. My solution is mostly correct, except that it doesn't work for the letter "a". I've got a char array with each letter at it's alphabet position index - 1 (so 'a' has an index of 0) and when I check if a character from the input is in the alphabet array, the check for 'a' fails. It boils down to the statement
evaluating as
false
. I actually shifted the alphabet array by one element and put in a '?' as the first element and then it worked for the test input (but won't work generally). Characters that are in the first position of the alphabet array are failing for some reason, so my solution will skip whatever character is in the first position ('a' here).For a solution in C, for long input strings, I'm getting +3 of the expected answer consistently. I get the expected answer when compiling and running on my local machine.