Pergunta de entrevista da empresa DeepCode

Asked to solve the "verify the braces" algorithmic problem in a Google Doc.