Pregunta de entrevista de TSS Consultancy

Code based on parentheses matching.