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.
Fixed
Seconding this. In the default python tests, Alphabet is a dict but it's treated like an object. Alphabet.TYPE should be changed to Alphabet['TYPE'].
I agree that your solution works in this case. If, however, all of the '+' signs had been '-' signs, your parse tree would have to have a different shape. Did you really code '+' to be right associative and happen to still get '-' as left associative?
I was going to change the test case to make it explicit, but I don't have time to get it right today. So, I'll just say this... the parse tree shown above does not agree with the BNF in the description. The BNF says that an expression is a term or an expression '+' a term or an expression '-' a term. It doesn't say that it can be a term '+' an expression.
Indeed. I have a solution which generates a valid pass1, I believe a valid pass2, and a proper pass3, but I can't submit because this first test-case is too strict.
This comment is hidden because it contains spoiler information about the solution