Pergunta de entrevista da empresa Caseware

How to find the end bracket given a random string with many nested brackets

Resposta da entrevista

Sigiloso

23 de jan. de 2019

Read through the string char by char, and have a counter for each open bracket (+1)/closed bracket(-1), return position when counter reaches zero

1