Metamidfev. de 2026
Follow up was about how to do it in place, without the extra string allocation.
Given a string of lowercase letters and parentheses, remove the minimum number of '(' or ')' characters so the remaining string is a valid parentheses string (properly matched and nested), returning any valid result while preserving character order. The core challenge is identifying and deleting unmatched parentheses (n up to 1e5) to achieve a balanced sequence.
Use esses exemplos para entender em que contexto ela costuma cair e adaptar sua prática.
Follow up was about how to do it in place, without the extra string allocation.
Nenhum anexo público associado a esta pergunta.
No app você encontra perguntas parecidas, compara empresas e aprofunda essa busca com mais filtros.