Enable Javascript in your browser and then refresh this page, for a much enhanced experience.
#7 solution in Clear category for Long Repeat by Rudeboyz_Squad
def long_repeat(line):
l = len(line)
a = [1]
for i in range(l-1):
b = 1
c = i+1
while c < l and line[i] == line[c]:
b += 1
c += 1
a.append(b)
return max(a) if l>0 else 0
March 4, 2019
Comments: