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.
I think, no1, for MgOH)2 you gotta error out cause you're not the one to assume what the input was SUPPOSED to be. maybe it was supposed to have a pair of parens, maybe none. error out.
No2, I think there may be no semantic diff between different styles of parens/brackets, but they must pair up exactly based on their particular style. So
(]
is not a valid pair. So, then,Au5(C2H5[OH)3Li]3
ought to error out too.The test cases are not well specified, and the best solution, as in the "MgOH)2" test, instead of throwing an exception, should just remove the unnecessary parenthesis, and in "Au5(C2H5[OH)3Li] 3" , instead of throwing an exception, it should work normally, because the parentheses can be round, square or wavy, with no difference between these
nice :D
So good that collections has an easy way to do it 😅
why? 💀