Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Long Repeat by Crachton
def long_repeat(string):
max_occur = 0
uniq = set(string)
for i in range(len(string), 0, -1):
for x in uniq:
if (x * i) in string:
return i
return 0
Sept. 30, 2017
Comments: