Pergunta de entrevista da empresa Parsons Corporation

Parse a string to see if parenthesis are valid. Nesting allowed.