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.
The test cases use your
encode
anddecode
functions. e.g. since a shift by 26 should have no effect,Test.assertEquals(cc.encode(s), s)
should work.What I suspect is that you are using character codes in your implementation? I assume this because the character code for
@
is 64, and the character code forM
is 77, which is 64+13, so it looks like when shifting backwards, that's what you're getting.