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.
My initial instinct was to implement something similar to yours but decided the code was too complex and doing too many unnecessary calculations. So I switched it to a simple substitution and capped my table to meet the requirements of the kata (actually I over-engineered it by one entry). This doesn't make mine right and yours wrong, we're just solving it around different priorities.
I'd probably do a couple of things differently if this was production code, but I would keep the symbols in an encoding table. Why calculate the same values over and over again?