Pregunta de entrevista de Intuitive

It was the valid parenthesis problem on a stack