Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
First solution in Clear category for Long Repeat by martin.pilka
def long_repeat(line):
cnt_max = 0
for i, c1 in enumerate(line):
cnt = 0
for c2 in line[i:]:
if c1 == c2:
cnt += 1
else:
break
if cnt > cnt_max:
cnt_max = cnt
return cnt_max
Jan. 15, 2019