Pergunta de entrevista da empresa Comeet

Write a code for finding properly closed brackets.