CAST Group interview question

Parse brackets from a string.