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
This was actually the first thing I attempted to do, but I wasn't sure it would work the way I initially thought it would. Guess I should've took the time to research and learn something, lol.
I just realized that I
dna.ToUpper();
each iteration...it hurts me.Fair enough FArekkusu, it hadn't occured to me that this kata may have been designed for a language in which a RegEx made more sense.
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
After looking at other solutions I realize that returning -1 to convey failure doesn't work when tested with
{3, 1, -1}
or{0, 2, -1}
. We'd have to select a return integer that isn't within the passed array in order to hopefully convey failure.