Pregunta de entrevista de Airbus

Longest common substring. Parenthesis problem.