Pergunta de entrevista da empresa Morgan Stanley

valid parenthesis, multiple brainteasers from the green book