Pergunta de entrevista da empresa Publishing.com

Simple coding task "correct bracket sequence"