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 is the design of the kata, there is only 1 exception to throw though, and the conditions of each are specified. This is a much better kata design than a lot of those which prompt users to
return -1
/return "invalid string"
as returning multiple types is bad practice.The only thing that one might be nitpicking is different condition should throw different Exceptions for debugging purposes . But since this is not a production-based coding foundation, I do not see much of an issue :-)
this was fairly common among solutions I scrolled through, so, yes, this is now tested for
Isn't this true for all kata? "If you don't know how to solve the kata, then you won't be able to solve it!" That in itself doesn't make the kata bad.