Pregunta de entrevista de Amazon Web Services

Function to count similar substrings