Pregunta de entrevista de Data Axle

Code : maximum repeating substring in string. Ex: abcdefabcd answer must be abcd.