Pregunta de entrevista de Microsoft

Matching parenthesis question from the leetcode