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.
In C, this is a very common practice and should be very obvious so I would say it is a best practice. The point you're getting at is good,t though. It's just doing a null check on this string in this way is idiomatic C.
Not to take away from the solution but this and most other solutions I see using strcmp and going through all 55 possibilities for every token. A different approach is to simply build a prefix tree and you will not need additional loops. Also, each code is fairly small, so with a tree, we do not travel very far in the tree for each symbol.