Pergunta de entrevista da empresa Leverage Edu

Stack based balanced paranthesis, easy followup