Pregunta de entrevista de Microsoft

How would you find repeated patterns in a string