Pregunta de entrevista de Morgan Stanley

valid parenthesis, multiple brainteasers from the green book