Domanda di colloquio di Intuitive

It was the valid parenthesis problem on a stack