Pregunta de entrevista de Tripadvisor

Balanced brackets (without stack / time complexity vs space complexity / improve time complexity)