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.
Your explanation is extremely helpful, thank you and kudos for the clever solution.
This is a bit older now so you may not remember but was this your first thought off how you thought to solve this? Or was this a clever idea you thought of later?
It replaces any empty pairs of brackets until there are any of those left. If the initial expression is valid, all braces will be removed, therefore
s
will become an empty string andnot s
will evaluate toTrue
; otherwises
will be non-enpmty andnot s
will evaluate toFalse
.This comment is hidden because it contains spoiler information about the solution