Pregunta de entrevista de H&M

Question based on dsa ..Check for Balanced Bracket expression