Question d’entretien chez Airbus

Longest common substring. Parenthesis problem.