Domanda di colloquio di Comeet

Write a code for finding properly closed brackets.