Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
Third solution in Clear category for Long Repeat by tmaeda11235
def long_repeat(line, c=__import__("itertools").combinations):
repeats = (line[a:b] for a, b in c(range(len(line) + 1), 2) if len(set(line[a:b]))==1)
return max(map(len, repeats), default=0)
Dec. 3, 2017