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.
something goofy happened(between first and last curly braces :P) when I split string str at the spaces. It seems like it added an empty value at the end of the string array x which forced me to add ""- 1" to both instances of x.Length that followed. If anyone could shed some light on why this happened or how to avoid it in the future, it would be greatly appreciated.
...just in case this kata is updated to include "lizard" and "spock"...
Instructions should state that empty arrays should return '0'.
This comment is hidden because it contains spoiler information about the solution
"And the award for longest and most convoluded solution goes to..."
Seriously though, after looking at some of the other answers, I am kind of embarrassed.